mirror of
https://litchi.icu/ngc2207/judge.git
synced 2025-05-18 18:56:33 +00:00
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
volumes:
|
|
postgres:
|
|
driver: local
|
|
gitea:
|
|
driver: local
|
|
|
|
services:
|
|
postgres:
|
|
image: docker.io/library/postgres:14
|
|
container_name: postgres
|
|
restart: always
|
|
environment:
|
|
- POSTGRES_USER=${POSTGRES_USER}
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
|
- POSTGRES_DB=${POSTGRES_DB}
|
|
volumes:
|
|
- postgres:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}" ]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 5s
|
|
|
|
gitea:
|
|
image: docker.io/gitea/gitea:1.22.6
|
|
container_name: gitea
|
|
restart: always
|
|
environment:
|
|
- GITEA__database__DB_TYPE=postgres
|
|
- GITEA__database__HOST=postgres:5432
|
|
- GITEA__database__NAME=${POSTGRES_DB}
|
|
- GITEA__database__USER=${POSTGRES_USER}
|
|
- GITEA__database__PASSWD=${POSTGRES_PASSWORD}
|
|
volumes:
|
|
- gitea:/data
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
ports:
|
|
- "3000:3000"
|
|
- "22:22"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|