docker-stacks/forgejo/docker-compose_embedded_db.yml

40 lines
1.1 KiB
YAML
Raw Permalink Normal View History

version: '3.7'
networks:
2024-02-22 23:10:59 +00:00
forgejo:
external: false
services:
server:
2024-02-22 23:10:59 +00:00
image: "codeberg.org/forgejo/forgejo:${IMAGE_TAG:-1.21}"
container_name: forgejo
depends_on:
- db
restart: unless-stopped
networks:
2024-02-22 23:10:59 +00:00
- forgejo
ports:
- "${HTTP_BIND_ADDR:-127.0.0.1}:${EXT_HTTP_PORT:-3000}:3000"
- "${EXT_SSH_PORT:-222}:22"
volumes:
- "${HOST_DATA_DIR:-./data}:/data"
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
2024-02-22 23:10:59 +00:00
- "FORGEJO__database__DB_TYPE=postgres"
- "FORGEJO__database__HOST=${DB_HOST:-db}:${DB_PORT:-5432}"
- "FORGEJO__database__NAME=${DB_NAME:-forgejo}"
- "FORGEJO__database__USER=${DB_USER:-forgejo}"
- "FORGEJO__database__PASSWD=${DB_PASSWD:-forgejo}"
db:
image: postgres:13
restart: unless-stopped
environment:
2024-02-22 23:10:59 +00:00
- "POSTGRES_USER=${DB_USER:-forgejo}"
- "POSTGRES_PASSWORD=${DB_PASSWD:-forgejo}"
- "POSTGRES_DB=${DB_NAME:-forgejo}"
networks:
2024-02-22 23:10:59 +00:00
- forgejo
volumes:
- "${HOST_PG_DATA_DIR:-./db}:/var/lib/postgresql/data"