diff options
Diffstat (limited to 'docker-compose.yml')
-rw-r--r-- | docker-compose.yml | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..6eeed16 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,29 @@ +version: '4.1' + +services: + app: + build: + dockerfile: Dockerfile + context: . + volumes: + - .:/app + environment: + POSTGRES_CONNECTION_STRING: "postgresql://app:app@db:5432/app" + depends_on: + db: + condition: service_healthy + ports: + - 8000:8000 + + db: + image: postgres + restart: always + environment: + POSTGRES_USER: app + POSTGRES_PASSWORD: app + POSTGRES_DB: app + healthcheck: + test: ["CMD-SHELL", "pg_isready -U app -d app"] + interval: 3s + timeout: 10s + retries: 3 |