-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (54 loc) · 1.24 KB
/
docker-compose.yml
File metadata and controls
57 lines (54 loc) · 1.24 KB
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
services:
db:
image: mysql:8.0.36-debian
container_name: nc3_db
restart: unless-stopped
command: --default-authentication-plugin=mysql_native_password
env_file:
- docker-compose.env
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
volumes:
- dbdata:/var/lib/mysql
- ./docker/mysql/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- app_network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
timeout: 20s
retries: 15
interval: 10s
start_period: 60s
app:
build:
context: .
dockerfile: Dockerfile
args:
PROXY: ${PROXY}
container_name: nc3_app
ports:
- "127.0.0.1:9000:9000"
restart: unless-stopped
env_file:
- docker-compose.env
environment:
DB_HOST: db
DB_PORT: 3306
PROXY: ${PROXY}
volumes:
- storage_data:/var/www/html/storage
- ./public:/var/www/html/public
depends_on:
db:
condition: service_healthy
networks:
- app_network
networks:
app_network:
driver: bridge
volumes:
dbdata:
storage_data: