-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
57 lines (52 loc) · 1.36 KB
/
docker-compose.prod.yml
File metadata and controls
57 lines (52 loc) · 1.36 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
services:
store:
image: postgres:17.5-alpine3.22
environment:
- POSTGRES_PASSWORD=${STORE_PASSWORD}
- POSTGRES_USER=${STORE_USER}
- POSTGRES_DB=${STORE_DB}
volumes:
- pg-data:/var/lib/postgresql/data
networks:
- go-web
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${STORE_USER} -d ${STORE_DB}"]
interval: 50s
timeout: 5s
retries: 5
cache:
image: memcached:1.6.38-alpine
networks:
- go-web
backend:
image: ghcr.io/livensmi1e/go-web:latest
networks:
- go-web
env_file:
- .env.prod
depends_on:
store:
condition: service_healthy
migrate:
condition: service_completed_successfully
migrate:
image: migrate/migrate
networks:
- go-web
restart: "no"
command:
[
"-path=/migrations",
"-database=postgres://${STORE_USER}:${STORE_PASSWORD}@store:5432/${STORE_DB}",
"up",
]
volumes:
- ./migrations:/migrations
depends_on:
store:
condition: service_healthy
volumes:
pg-data:
networks:
go-web:
driver: bridge