-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
37 lines (35 loc) · 802 Bytes
/
docker-compose.yml
File metadata and controls
37 lines (35 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
version: '3.1'
services:
db:
image: postgres:latest
container_name: postgres_db
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: testdb
ports:
- "5432:5432"
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user -d testdb"]
interval: 10s
retries: 5
start_period: 30s
timeout: 5s
app:
build:
context: .
dockerfile: Docker/Dockerfile
container_name: flask_app
environment:
FLASK_APP: run.py
FLASK_ENV: development
DATABASE_URL: postgresql://user:password@db:5432/testdb
ports:
- "5000:5000"
depends_on:
db:
condition: service_healthy
volumes:
- .:/app