-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
49 lines (45 loc) · 930 Bytes
/
docker-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
version: '3'
services:
strapi:
build:
context: .
dockerfile: ./docker/strapi/Dockerfile.local
environment:
- DATABASE_CLIENT=mysql
- DATABASE_HOST=db
- DATABASE_PORT=3306
- DATABASE_NAME=strapi
- DATABASE_USERNAME=strapi
- DATABASE_PASSWORD=strapi
ports:
- 1337:1337
working_dir: /opt/app
volumes:
- ./app:/opt/app
- node_modules:/opt/app/node_modules
depends_on:
- db
networks:
- gatsby_network
db:
build:
context: .
dockerfile: ./docker/db/Dockerfile
restart: always
environment:
MYSQL_DATABASE: strapi
MYSQL_USER: strapi
MYSQL_PASSWORD: strapi
MYSQL_ROOT_PASSWORD: strapi
ports:
- 3306:3306
volumes:
- db-data:/var/lib/mysql
networks:
- gatsby_network
networks:
gatsby_network:
external: true
volumes:
node_modules:
db-data: