-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
45 lines (43 loc) · 982 Bytes
/
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
version: "3"
services:
app:
container_name: app
build: ./golang
volumes:
- ./golang:/golang
ports:
- "8080:8080"
depends_on:
db:
condition: service_healthy
command: sh -c "fresh"
nuxt:
container_name: nuxt
build: ./nuxt
ports:
- 3000:3000
volumes:
- ./nuxt:/app
- /app/node_modules
stdin_open: true
tty: true
command: sh -c "yarn && yarn dev"
db:
container_name: db
platform: linux/x86_64 # M1 Mac対応のため
image: mysql:5.7
volumes:
- ./mysql/conf:/etc/mysql/conf.d
- ./mysql/data:/var/lib/mysql
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
ports:
- 3306:3306
environment:
MYSQL_DATABASE: golang-nuxt-app
MYSQL_ROOT_PASSWORD: password
MYSQL_USER: root
TZ: "Asia/Tokyo"
healthcheck:
test: "/etc/init.d/mysql status"
interval: 1s
retries: 60