-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathec2-docker-compose.yml
More file actions
36 lines (34 loc) · 966 Bytes
/
ec2-docker-compose.yml
File metadata and controls
36 lines (34 loc) · 966 Bytes
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
services:
# db:
# image: mysql:8.0.32
# platform: linux/amd64 # mac環境で必須なことがあるらしい
# env_file: ./db/.env
# container_name: v_kara_db
# build:
# context: ./db
# healthcheck:
# test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
# timeout: 5s
# retries: 10
# ports:
# - "3306:3306"
# command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
api:
image: v-kara-api:latest
container_name: v-kara-api
environment:
- DEPLOY_ENV=EC2_DOCKER_COMPOSE
- DEPLOY_DB_ENV=RDS
- IS_DOCKER_COMPOSE=true
env_file: api.env # これが無いと、上述のenvironment変数が無視される。なぜかは不明。
ports:
- "8080:8080"
app:
image: v-kara-app:latest
container_name: v-kara-app
env_file: .env
environment:
- DEPLOY_ENV=EC2_DOCKER_COMPOSE
- IS_DOCKER_COMPOSE=true
ports:
- "80:80"