2025-07-14 12:48:15 +05:30
|
|
|
# Forgejo Git Service Configuration
|
2025-07-05 19:33:32 +05:30
|
|
|
services:
|
|
|
|
|
forgejo:
|
2025-07-14 12:48:15 +05:30
|
|
|
# Basic container configuration
|
2025-07-05 19:33:32 +05:30
|
|
|
container_name: forgejo
|
2025-07-13 18:35:45 +05:30
|
|
|
image: codeberg.org/forgejo/forgejo:11.0.3-rootless
|
|
|
|
|
restart: unless-stopped
|
2025-07-14 12:48:15 +05:30
|
|
|
user: ${PUID}:${PGID} # Runs as specified user/group
|
|
|
|
|
|
|
|
|
|
# Persistent storage configuration
|
2025-07-05 19:33:32 +05:30
|
|
|
volumes:
|
2025-07-14 12:48:15 +05:30
|
|
|
- ${APPDATA_PATH}/forgejo/config:/etc/gitea # Configuration files
|
|
|
|
|
- ${APPDATA_PATH}/forgejo/data:/var/lib/gitea # Application data
|
|
|
|
|
- /etc/timezone:/etc/timezone:ro # Timezone configuration
|
|
|
|
|
- /etc/localtime:/etc/localtime:ro # Local time configuration
|
|
|
|
|
|
|
|
|
|
# Network port configuration
|
2025-07-05 19:33:32 +05:30
|
|
|
ports:
|
2025-07-14 12:48:15 +05:30
|
|
|
- ${SERVER_PORT}:3000 # Maps host port to Forgejo web interface
|
|
|
|
|
|
|
|
|
|
# Network configuration
|
2025-07-08 16:40:16 +05:30
|
|
|
networks:
|
2025-07-14 12:48:15 +05:30
|
|
|
- frontend # Connects to frontend network
|
2025-07-08 16:40:16 +05:30
|
|
|
|
2025-07-14 12:48:15 +05:30
|
|
|
# External network definition
|
2025-07-08 16:40:16 +05:30
|
|
|
networks:
|
|
|
|
|
frontend:
|
2025-07-14 12:48:15 +05:30
|
|
|
external: true # Uses pre-existing frontend network
|