mirror of
https://litchi.icu/ngc2207/judge.git
synced 2025-05-18 22:56:33 +00:00
feat(docker): add Docker Compose configuration for PostgreSQL service
This commit is contained in:
parent
a16f5a6e1d
commit
ee3c6eea47
23
docker/compose.yml
Normal file
23
docker/compose.yml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
volumes:
|
||||||
|
postgres:
|
||||||
|
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
|
Loading…
Reference in New Issue
Block a user