-
Notifications
You must be signed in to change notification settings - Fork 142
/
docker-compose.yml
74 lines (72 loc) · 1.42 KB
/
docker-compose.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
services:
app:
build:
context: .
dockerfile: ./docker/icare/Dockerfile
container_name: icare.app
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
env_file:
- ./docker/icare/variables.env
networks:
- icare
ports:
- 3000:3000
restart: on-failure
healthcheck:
test: curl -Ik localhost:3000
interval: 5s
volumes:
- assets:/rails/public
db:
container_name: icare.db
environment:
POSTGRES_HOST_AUTH_METHOD: trust
platform: linux/amd64
image: postgis/postgis:12-3.4-alpine
networks:
- icare
restart: on-failure
healthcheck:
test: pg_isready -U postgres
interval: 5s
retries: 30
volumes:
- db-data:/var/lib/postgresql/data
nginx:
build:
context: .
dockerfile: ./docker/nginx/Dockerfile
container_name: icare.nginx
depends_on:
app:
condition: service_healthy
networks:
- icare
ports:
- 3080:80
- 3443:443
restart: on-failure
volumes:
- assets:/nginx/public:ro
redis:
container_name: icare.redis
image: redis:7.2.0-alpine
networks:
- icare
restart: on-failure
healthcheck:
test: redis-cli ping
interval: 3s
retries: 30
volumes:
- redis-data:/data
networks:
icare:
volumes:
assets:
db-data:
redis-data: