networks: judge4c-network: name: judge4c-network driver: bridge volumes: judge4c-gitea-vol: name: judge4c-gitea-vol driver: local judge4c-postgres-vol: name: judge4c-postgres-vol driver: local services: judge4c-postgres: image: postgres:14 container_name: judge4c-postgres environment: POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} POSTGRES_DB: ${POSTGRES_DB} restart: always networks: - judge4c-network volumes: - judge4c-postgres-vol:/var/lib/postgresql/data healthcheck: test: [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}" ] interval: 10s timeout: 5s retries: 5 judge4c-gitea: image: gitea/gitea:1.22.4 container_name: judge4c-gitea environment: DB_TYPE: postgres DB_HOST: judge4c-postgres:5432 DB_NAME: ${POSTGRES_DB} DB_USER: ${POSTGRES_USER} DB_PASSWD: ${POSTGRES_PASSWORD} restart: always networks: - judge4c-network volumes: - judge4c-gitea-vol:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro depends_on: judge4c-postgres: condition: service_healthy