-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.prod.yml
68 lines (63 loc) · 1.6 KB
/
docker-compose.prod.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
version: "3.8"
services:
db:
image: postgres:14
volumes:
- myapp_db_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${POSTGRES_USER:-user}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
api:
build:
context: ./api/
dockerfile: Dockerfile
target: production
ports:
- "3000:3000"
environment:
TZ: Asia/Tokyo
RAILS_ENV: ${RAILS_ENV:-production}
DEVISE_JWT_SECRET_KEY: ${DEVISE_JWT_SECRET_KEY}
GMAIL_SMTP_USER: ${GMAIL_SMTP_USER}
GMAIL_SMTP_PASSWORD: ${GMAIL_SMTP_PASSWORD}
APP_NAME: ${APP_NAME}
REDIS_URL: ${REDIS_URL}
SHOP_FRONTEND_URL: ${SHOP_FRONTEND_URL}
API_DATABASE_PASSWORD: ${API_DATABASE_PASSWORD}
depends_on:
- db
- redis
front:
build:
context: ./front/
dockerfile: Dockerfile
command: sh -c "cd myapp-front && npm install && npm start"
ports:
- "3001:3000"
environment:
REACT_APP_API_URL: ${REACT_APP_API_URL}
redis:
image: redis
command: redis-server
ports:
- "6379:6379"
sidekiq:
build:
context: ./api/
dockerfile: Dockerfile
target: production
command: bundle exec sidekiq
environment:
RAILS_ENV: ${RAILS_ENV:-production}
REDIS_URL: ${REDIS_URL}
GMAIL_SMTP_USER: ${GMAIL_SMTP_USER}
GMAIL_SMTP_PASSWORD: ${GMAIL_SMTP_PASSWORD}
APP_NAME: ${APP_NAME}
SHOP_FRONTEND_URL: ${SHOP_FRONTEND_URL}
SHOP_API_URL: ${SHOP_API_URL}
API_DATABASE_PASSWORD: ${API_DATABASE_PASSWORD}
depends_on:
- db
- redis
volumes:
myapp_db_data: