mirror of
https://litchi.icu/ngc2207/judge4c-docker-compose.git
synced 2025-05-18 09:47:40 +00:00
gitea & postgres
This commit is contained in:
commit
f3105b8cac
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# env files
|
||||||
|
.env*
|
51
docker-compose.yml
Normal file
51
docker-compose.yml
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
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
|
Loading…
Reference in New Issue
Block a user