-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.staging.yml
109 lines (100 loc) · 2.08 KB
/
docker-compose.staging.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
version: '3'
services:
postgres:
restart: always
volumes:
- /var/www/PROJECT/postgresql/data-10.0:/var/lib/postgresql/data
logging:
driver: journald
environment: &postgres_env
POSTGRES_DB: KEY
POSTGRES_USER: KEY
POSTGRES_PASSWORD: KEY
redis:
restart: always
volumes:
- /var/www/PROJECT/redis/data:/data
logging:
driver: journald
nginx:
build:
context: ./docker/nginx/
dockerfile: Dockerfile
image: PROJECT/nginx
restart: always
volumes:
- /var/www/PROJECT/frontend:/frontend
- /var/www/PROJECT/public:/public
ports:
- 80:80
- 443:443
links:
- backend
logging:
driver: journald
frontend:
build:
args:
BRANCH: master
environment:
WEBPACK_BUILD_ENV: production
image: PROJECT/frontend
volumes:
- /var/www/PROJECT/frontend:/assets
logging:
driver: journald
command: ./docker-entrypoint.sh
backend:
build:
args:
<<: *backend_env
BRANCH: master
environment: &backend_env
<<: *postgres_env
REDIS_URL: redis://redis:6379/1
POSTGRES_HOST: postgres
RAILS_ENV: staging
restart: always
expose:
- 3000
logging:
driver: journald
sidekiq:
environment:
<<: *backend_env
SERVICE_NAME: sidekiq
restart: always
logging:
driver: journald
cron:
environment:
<<: *backend_env
SERVICE_NAME: cron
restart: always
logging:
driver: journald
helper:
environment:
image: PROJECT/backend
<<: *backend_env
SERVICE_NAME: helper
volumes:
- /var/www/PROJECT/public:/public
logging:
driver: journald
backup:
build:
context: ./docker/backup/
dockerfile: Dockerfile
image: PROJECT/backup
environment:
<<: *backend_env
SERVICE_NAME: backup
AWS_ACCESS_KEY_ID: KEY
AWS_SECRET_ACCESS_KEY: KEY
AWS_REGION: KEY
S3_BUCKET_NAME: KEY
depends_on:
- postgres
logging:
driver: journald