-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
82 lines (78 loc) · 2.18 KB
/
docker-compose.yml
File metadata and controls
82 lines (78 loc) · 2.18 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
version: '3.8'
services:
app:
build:
context: ./flynext
dockerfile: Dockerfile
container_name: flynext_app
ports:
- "3000:3000"
env_file:
- path: ./flynext/.env
required: true
- path: ./flynext/.env.prod
required: false
environment:
- DATABASE_URL=${DATABASE_URL:-postgresql://postgres:postgres@flynext-db:5432/flynext}
depends_on:
afs:
condition: service_healthy
afs-db:
condition: service_healthy
flynext-db:
image: postgres:13
container_name: flynext-db
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-flynext}
healthcheck:
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER:-postgres}", "-d", "${POSTGRES_DB:-flynext}"]
interval: 1s
timeout: 5s
retries: 10
ports:
- "5432:5432"
volumes:
- ./docker-data/flynext-pgdata:/var/lib/postgresql/data
afs-db:
image: postgres:13
container_name: afs-db
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-afs}
healthcheck:
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER:-postgres}", "-d", "${POSTGRES_DB:-afs}"]
interval: 1s
timeout: 5s
retries: 10
# ports:
# - "5432:5432"
volumes:
- ./docker-data/afs-pgdata:/var/lib/postgresql/data
afs:
build:
context: ./afs
dockerfile: Dockerfile
container_name: afs
ports:
- "3001:3000"
env_file:
- path: ./afs/.env
required: false
environment:
- DATABASE_URL=${DATABASE_URL:-postgresql://postgres:postgres@afs-db:5432/afs}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/cities", "-H", "x-api-key: e7ffef083aaed516b93256620e5f74cf03af4fd1a01968d923d4834a222d17c7"]
start_period: 60s
start_interval: 5s
interval: 30s
timeout: 10s
retries: 5
depends_on:
- afs-db
volumes:
- ./docker-data/.db-initialized:/app/.db-initialized