-
Notifications
You must be signed in to change notification settings - Fork 7
/
compose.yaml
114 lines (114 loc) · 3.35 KB
/
compose.yaml
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
services:
app:
build:
context: .
dockerfile: Dockerfile
args:
- RAILS_ENV=development
entrypoint: /bin/sh -c "docker/wait-for-it.sh db:3306 --timeout=600 && bundle exec rails db:migrate && bundle exec rails db:seed_fu && ./entrypoint.sh"
environment: &dkenv
RAILS_ENV: development
NODE_ENV: development
SENTRY_DSN: ${SENTRY_DSN}
S3_REGION: ap-northeast-1
S3_BUCKET: ${S3_BUCKET}
AUTH0_CLIENT_ID: ${AUTH0_CLIENT_ID}
AUTH0_CLIENT_SECRET: ${AUTH0_CLIENT_SECRET}
AUTH0_DOMAIN: ${AUTH0_DOMAIN}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
DREAMKAST_API_ADDR: "https://api.dev.cloudnativedays.jp"
AWS_REGION: ap-northeast-1
MYSQL_HOST: db
MYSQL_USER: user
MYSQL_PASSWORD: password
MYSQL_DATABASE: dreamkast
REDIS_URL: redis://redis:6379
RAILS_MASTER_KEY: ${RAILS_MASTER_KEY}
SQS_FIFO_QUEUE_URL: http://localstack:4566/000000000000/default
REVIEW_APP: "true"
DREAMKAST_NAMESPACE: "localhost"
tty: true
stdin_open: true
tmpfs:
- /app/tmp
ports:
- "3000:3000"
depends_on:
- db
- localstack
fifo-worker:
platform: linux/amd64
build: .
entrypoint: /bin/sh -c "docker/wait-for-it.sh db:3306 --timeout=600 && bundle exec aws_sqs_active_job --queue fifo"
environment:
<<: *dkenv
BROWSER_PATH: /usr/bin/google-chrome
tty: true
stdin_open: true
tmpfs:
- /app/tmp
depends_on:
db:
condition: service_started
localstack:
condition: service_healthy
db:
image: mysql/mysql-server:8.0
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: dreamkast
MYSQL_USER: user
MYSQL_PASSWORD: password
TZ: 'Asia/Tokyo'
cap_add:
- SYS_NICE
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_0900_ai_ci --default-authentication-plugin=mysql_native_password
volumes:
- mysql-data:/var/lib/mysql
- ./db/docker-entrypoint-initdb.d/1_allow-host-ip.sql:/docker-entrypoint-initdb.d/1_allow-host-ip.sql
ports:
- "3306:3306"
redis:
image: "redis:7"
volumes:
- redis-data:/data
ports:
- "6379:6379"
nginx:
image: nginx
volumes:
- ./config/default.conf:/etc/nginx/conf.d/default.conf
ports:
- 8080:80
ui:
image: 607167088920.dkr.ecr.ap-northeast-1.amazonaws.com/dreamkast-ui:latest
ports:
- 3001:3001
environment:
- NEXT_PUBLIC_AUTH0_DOMAIN=dreamkast.us.auth0.com
- NEXT_PUBLIC_AUTH0_CLIENT_ID=0cWWdpGt4CpWjHJ9QIHtPm5GrJLS25lz
- NEXT_PUBLIC_AUTH0_AUDIENCE=https://event.cloudnativedays.jp/
- NEXT_PUBLIC_BASE_PATH=/cndt2022/ui
- NEXT_PUBLIC_API_BASE_URL=http://localhost:8080/
- NEXT_PUBLIC_EVENT_SALT=cndt2022
localstack:
image: localstack/localstack:3.8.1
environment:
- SERVICES=sqs
- DEFAULT_REGION=ap-northeast-1
- DATA_DIR=/var/lib/localstack/data
volumes:
- ./localstack/init:/etc/localstack/init:ro
- ./localstack:/var/lib/localstack
ports:
- 4566:4566
healthcheck:
test: awslocal sqs list-queues --region ap-northeast-1 --output=text | grep default
interval: 10s
timeout: 60s
retries: 10
start_period: 1s
volumes:
mysql-data:
redis-data: