This repository has been archived by the owner on Nov 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
executable file
·119 lines (110 loc) · 2.34 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
version: "3"
volumes:
vol_data:
vol_shared:
vol_redis:
bundle:
services:
claredis:
image: 'redis:5-alpine'
command: redis-server
ports:
- '127.0.0.1:6379:6379'
volumes:
- 'vol_redis:/data'
networks:
- mynetwork
clara_nginx:
restart: always
privileged: true
build:
context: .
dockerfile: dockerfile_nginx
args:
- ENV_TYPE=${ENV:-production}
hostname: clara_nginx
container_name: clara_nginx
volumes:
- "vol_shared:/var/www/ara"
- "../private/nginx:/home/nginx"
ports:
- "80:80"
- "443:443"
depends_on:
- clara_rails
networks:
- mynetwork
clara_rails:
restart: always
build:
context: .
dockerfile: dockerfile_rails
args:
- ENV_TYPE=${ENV:-production}
hostname: clara_rails
container_name: clara_rails
volumes:
- "vol_shared:/var/www/ara"
- "bundle:/usr/local/bundle"
- "./rails:/home/clara"
- "../private/env:/home/env"
depends_on:
- claredis
networks:
- mynetwork
clara_db:
restart: always
build:
context: .
dockerfile: dockerfile_db
args:
- ENV_TYPE=${ENV:-production}
hostname: clara_db
container_name: clara_db
volumes:
- "vol_data:/var/lib/postgresql/data"
- "../private/db:/home/db"
networks:
- mynetwork
clara_backups:
restart: always
build:
context: .
dockerfile: dockerfile_backups
args:
- ENV_TYPE=${ENV:-production}
hostname: clara_backups
container_name: clara_backups
volumes:
- "./backups/home/backups:/home/backups"
- "../:/home/docker"
- "vol_shared:/var/www/ara"
- "./rails:/home/clara"
- "../private/env:/home/env"
- "/mnt/backups:/mnt/backups"
depends_on:
- clara_db
networks:
- mynetwork
clara_sidekiq:
build:
context: .
dockerfile: dockerfile_rails
depends_on:
- clara_db
- claredis
- clara_rails
command: >
bash -c "cd /var/www/ara/current
&& bundle install
&& bundle exec sidekiq -e production -C config/sidekiq.yml"
volumes:
- "bundle:/usr/local/bundle"
- "vol_shared:/var/www/ara"
- "../private/env:/home/env"
- "./rails:/home/clara"
networks:
- mynetwork
networks:
mynetwork:
driver: bridge