docker-stacks/gitea/docker-compose_embedded_db.yml
2022-03-02 02:54:35 +03:00

40 lines
1 KiB
YAML

version: '3.7'
networks:
gitea:
external: false
services:
server:
image: gitea/gitea:latest
container_name: gitea
depends_on:
- db
restart: unless-stopped
networks:
- gitea
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:
- GITEA__database__DB_TYPE=postgres
- "GITEA__database__HOST=${DB_HOST:-db}:${DB_PORT:-5432}"
- "GITEA__database__NAME=${DB_NAME:-gitea}"
- "GITEA__database__USER=${DB_USER:-gitea}"
- "GITEA__database__PASSWD=${DB_PASSWD:-gitea}"
db:
image: postgres:13
restart: unless-stopped
environment:
- "POSTGRES_USER=${DB_USER:-gitea}"
- "POSTGRES_PASSWORD=${DB_PASSWD:-gitea}"
- "POSTGRES_DB=${DB_NAME:-gitea}"
networks:
- gitea
volumes:
- "${HOST_PG_DATA_DIR:-./db}:/var/lib/postgresql/data"