35 lines
1.1 KiB
YAML
35 lines
1.1 KiB
YAML
services:
|
|
forgejo:
|
|
image: codeberg.org/forgejo/forgejo:9
|
|
container_name: forgejo
|
|
restart: always
|
|
environment:
|
|
# General Server Settings
|
|
- FORGEJO__server__RUN_MODE=prod
|
|
- FORGEJO__server__ROOT_URL=${FORGEJO_ROOT_URL:-http://16.113.57.127:3000/}
|
|
- FORGEJO__server__HTTP_PORT=3000
|
|
- FORGEJO__server__DOMAIN=16.113.57.127
|
|
|
|
# Database Configuration (MySQL/MariaDB connection)
|
|
- FORGEJO__database__DB_TYPE=mysql
|
|
- FORGEJO__database__HOST=${FORGEJO_DB_HOST}
|
|
- FORGEJO__database__NAME=${FORGEJO_DB_NAME}
|
|
- FORGEJO__database__USER=${FORGEJO_DB_USER}
|
|
- FORGEJO__database__PASSWD=${FORGEJO_DB_PASSWORD}
|
|
|
|
# Disable installer screen since we configure via environment/app.ini
|
|
- FORGEJO__security__INSTALL_LOCK=true
|
|
|
|
# Disable public registration (prevent outside signups)
|
|
- FORGEJO__service__DISABLE_REGISTRATION=true
|
|
ports:
|
|
# Expose Forgejo HTTP port publicly
|
|
- "3000:3000"
|
|
# Expose SSH port
|
|
- "2222:22"
|
|
volumes:
|
|
- forgejo-data:/data
|
|
|
|
volumes:
|
|
forgejo-data:
|
|
driver: local
|