-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
72 lines (68 loc) · 1.59 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
services:
strapi:
container_name: strapi
build:
context: .
dockerfile: Dockerfile
environment:
DATABASE_HOST: mysql
DATABASE_PORT: 3306
DATABASE_NAME: test_cog
DATABASE_USERNAME: strapi
DATABASE_PASSWORD: strapi_password
NODE_ENV: development
ports:
- "1337:1337"
volumes:
- ./:/app
- /app/node_modules
- build-data:/app/build
depends_on:
mysql:
condition: service_healthy
networks:
- strapi-network
restart: unless-stopped
mysql:
container_name: mysql
image: mysql:8.0
platform: linux/arm64/v8
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: root_password
MYSQL_DATABASE: test_cog
MYSQL_USER: strapi
MYSQL_PASSWORD: strapi_password
MYSQL_ROOT_HOST: "%" # Allow root access from any host
ports:
- "3306:3306"
volumes:
- mysql-data:/var/lib/mysql
- ./src/database/init:/docker-entrypoint-initdb.d
networks:
- strapi-network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
timeout: 20s
retries: 10
interval: 10s
phpmyadmin:
container_name: phpmyadmin
image: bitnami/phpmyadmin:latest
platform: linux/arm64/v8
ports:
- "8080:8080"
environment:
- DATABASE_HOST=mysql
- MYSQL_ROOT_PASSWORD=root_password
depends_on:
- mysql
networks:
- strapi-network
restart: unless-stopped
volumes:
mysql-data:
build-data:
networks:
strapi-network:
driver: bridge