-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
73 lines (68 loc) · 1.8 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
version: "3.8"
services:
db:
image: postgres:14
volumes:
- ./tmp/db:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${POSTGRES_USER:-user}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
api:
build:
context: ./api/
dockerfile: Dockerfile
target: development
command: /bin/sh -c "rm -f /myapp-api/tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
ports:
- "3000:3000"
volumes:
- ./api:/myapp-api
environment:
TZ: Asia/Tokyo
RAILS_ENV: ${RAILS_ENV:-development}
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"
volumes:
- ./front:/usr/src/app
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: development
command: bundle exec sidekiq
volumes:
- ./api:/myapp-api
environment:
RAILS_ENV: ${RAILS_ENV:-development}
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