-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
85 lines (81 loc) · 1.98 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
73
74
75
76
77
78
79
80
81
82
83
84
85
version: "3.7"
services:
# PHP Service
app:
build:
args:
user: root
uid: 1000
context: ./
dockerfile: Dockerfile
image: demo
container_name: demo-app
restart: unless-stopped
working_dir: /var/www/
stdin_open: true
tty: true
environment:
- CHOKIDAR_USEPOLLING=true
- PHP_IDE_CONFIG=serverName=XdebugServer
- DEBUG=1
volumes:
- ./:/var/www:delegated
- ./:/usr/src/app:cached
ports:
- "9015:9000"
depends_on:
- 'mariadb'
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- demo
# Database service
mariadb:
image: mariadb:10.5
container_name: demo-db
restart: unless-stopped
ports:
- 3308:3306
volumes:
- "/var/lib/mysql/data"
- "/var/lib/mysql/logs"
- /var/docker/mariadb/conf:/etc/mysql
environment:
MYSQL_ROOT_PASSWORD: "root"
MYSQL_DATABASE: "demo"
MYSQL_USER: "root"
MYSQL_PASSWORD: "root"
networks:
- demo
# Nginx service
nginx-demo:
image: nginx:1.17-alpine
container_name: demo-nginx
restart: unless-stopped
ports:
- "80:80"
depends_on:
- app
- mariadb
volumes:
- ./:/var/www:delegated
- ./docker-compose/nginx:/etc/nginx/conf.d
networks:
- demo
npm:
image: node:14-alpine
container_name: demo-npm
volumes:
- .:/var/www
working_dir: /var/www
entrypoint: [ 'npm' ]
networks:
- demo
# Add these lines:
ports:
- 3000:3000
- 3001:3001
- 8080:8080
networks:
demo:
driver: bridge