45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
version: "3.7"
|
|
|
|
services:
|
|
forgejo:
|
|
image: codeberg.org/forgejo/forgejo:1.19.3-0
|
|
container_name: forgejo
|
|
environment:
|
|
- USER_UID=1000
|
|
- USER_GID=1000
|
|
- FORGEJO__database__DB_TYPE=postgres
|
|
- FORGEJO__database__HOST=forgejo-db:5432
|
|
- FORGEJO__database__NAME=forgejo
|
|
- FORGEJO__database__USER=forgejo
|
|
- FORGEJO__database__PASSWD=forgejo
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ${APP_DATA_DIR}/data/forgejo:/data
|
|
ports:
|
|
- ${APP_PORT}:3000
|
|
- "222:22"
|
|
depends_on:
|
|
- forgejo-db
|
|
networks:
|
|
- tipi_main_network
|
|
labels:
|
|
traefik.enable: ${APP_EXPOSED}
|
|
traefik.http.routers.forgejo.rule: Host(`${APP_DOMAIN}`)
|
|
traefik.http.routers.forgejo.entrypoints: websecure
|
|
traefik.http.routers.forgejo.service: forgejo
|
|
traefik.http.routers.forgejo.tls.certresolver: myresolver
|
|
traefik.http.services.forgejo.loadbalancer.server.port: 3000
|
|
|
|
forgejo-db:
|
|
container_name: forgejo-db
|
|
image: postgres:14
|
|
restart: unless-stopped
|
|
environment:
|
|
- POSTGRES_USER=forgejo
|
|
- POSTGRES_PASSWORD=forgejo
|
|
- POSTGRES_DB=forgejo
|
|
volumes:
|
|
- ${APP_DATA_DIR}/data/postgres:/var/lib/postgresql/data
|
|
networks:
|
|
- tipi_main_network
|