ifcurl/dev/compose.yml

51 lines
1.7 KiB
YAML
Raw Normal View History

services:
2026-04-16 00:56:46 +01:00
forgejo:
image: codeberg.org/forgejo/forgejo:10
container_name: ifcurl-forgejo
restart: unless-stopped
ports:
- "3000:3000" # web UI
- "2222:22" # SSH (avoids conflict with host sshd on 22)
volumes:
2026-04-16 00:56:46 +01:00
- forgejo-data:/data
environment:
# Run the container process as the current host user so files in the
# volume are owned by you, not root.
USER_UID: "${UID:-1000}"
USER_GID: "${GID:-1000}"
# Skip the interactive web installer — all required settings are
# supplied here as environment variables.
GITEA__security__INSTALL_LOCK: "true"
# Database: SQLite is sufficient for local development.
GITEA__database__DB_TYPE: sqlite3
GITEA__database__PATH: /data/gitea/gitea.db
2026-04-16 00:56:46 +01:00
# Server: tell Forgejo its own public URL so clone URLs are correct.
GITEA__server__HTTP_PORT: "3000"
GITEA__server__ROOT_URL: "http://localhost:3000"
GITEA__server__SSH_PORT: "2222"
GITEA__server__SSH_LISTEN_PORT: "22"
# Reduce log noise during development.
GITEA__log__LEVEL: Warn
volumes:
2026-04-16 00:56:46 +01:00
forgejo-data:
name: ifcurl-forgejo-data
# Usage:
2026-04-16 00:56:46 +01:00
# podman-compose up -d start Forgejo
# podman-compose down stop (data preserved)
# podman-compose down -v stop and wipe all data
#
# On first run, create an admin user:
2026-04-16 00:56:46 +01:00
# podman exec --user git ifcurl-forgejo forgejo admin user create \
# --username admin --password admin1234 --email admin@localhost \
# --admin --must-change-password=false
#
# Web UI: http://localhost:3000 (admin / admin1234)
# SSH: ssh://git@localhost:2222/<user>/<repo>.git
# API: http://localhost:3000/api/v1 (basic auth or token)