-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.migration.yml
56 lines (53 loc) · 1.3 KB
/
compose.migration.yml
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
services:
app:
build:
context: ./typeflow
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
REDIS_URL: redis://:${REDIS_PASSWORD}@redis:${REDIS_PORT}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
restart: always
postgres:
build:
context: ./db
dockerfile: Dockerfile
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- pg-refactor:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}"]
interval: 10s
retries: 5
start_period: 5s
restart: always
redis:
image: redis:7.2.4
command: redis-server --requirepass ${REDIS_PASSWORD}
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD}
expose:
- ${REDIS_PORT}
volumes:
- redis-refactor:/data
healthcheck:
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD}", "ping"]
interval: 10s
timeout: 30s
retries: 50
start_period: 30s
restart: always
volumes:
pg-refactor:
redis-refactor: