-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
49 lines (46 loc) · 1.27 KB
/
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'
networks:
nw_wapp_simple_todo_list:
proxy_net:
external:
name: proxy_net
services:
nginx:
restart: always
container_name: wapp_simple_todo_list_nginx
# hostname: wapp_simple_todo_list.local
build:
context: ./docker/nginx
dockerfile: Dockerfile
working_dir: /var/www
# ports:
# - "${NGINX_PORT}:80"
volumes:
- ${WORK_PATH}:/var/www
- ./docker/nginx/conf.d:/etc/nginx/conf.d
- ./docker/nginx/logs:/var/log/nginx/
depends_on:
- php_fpm
networks:
- proxy_net
- nw_wapp_simple_todo_list
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy_net"
- "traefik.http.routers.wapp_simple_todo_list_nginx.rule=Host(`${PREFIX}wapp_simple_todo_list.local`) || Host(`${PREFIX}wapp_simple_todo_list.localhost`)"
php_fpm:
restart: always
container_name: wapp_simple_todo_list_php_fpm
hostname: php_fpm
build:
context: ./docker/php-workspace
dockerfile: ./Dockerfile
args:
TZ: ${WORKSPACE_TIMEZONE}
working_dir: /var/www
volumes:
- ${WORK_PATH}:/var/www
- ./docker/php-workspace/logs/log1:/var/log/
- ./docker/php-workspace/logs/log2:/usr/local/var/log
networks:
- nw_wapp_simple_todo_list