-
Notifications
You must be signed in to change notification settings - Fork 28
/
docker-compose.yml
101 lines (94 loc) · 2.85 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
version: '3'
services:
mariadb:
image: wodby/mariadb:$MARIADB_TAG
container_name: "${PROJECT_NAME}_mariadb"
stop_grace_period: 30s
environment:
MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD
MYSQL_DATABASE: $DB_NAME
MYSQL_USER: $DB_USER
MYSQL_PASSWORD: $DB_PASSWORD
MYSQL_PORT: $DB_PORT
volumes:
- ./docker/database/pecedb:/var/lib/mysql # Use bind mount
php:
build:
context: ./
dockerfile: ./docker/DockerfileWodbyPHP
container_name: "${PROJECT_NAME}_php"
environment:
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
DB_HOST: $DB_HOST
DB_USER: $DB_USER
DB_PASSWORD: $DB_PASSWORD
DB_NAME: $DB_NAME
DB_DRIVER: $DB_DRIVER
PHP_FPM_USER: wodby
PHP_FPM_GROUP: wodby
COLUMNS: 80 # Set 80 columns for docker exec -it.
volumes:
- ./:/var/www/html
- $HOME/.ssh:/pece/.ssh
- $HOME/.gitconfig:/pece/.gitconfig
nginx:
image: wodby/nginx:$NGINX_TAG
container_name: "${PROJECT_NAME}_nginx"
depends_on:
- php
environment:
NGINX_STATIC_OPEN_FILE_CACHE: "off"
NGINX_ERROR_LOG_LEVEL: debug
NGINX_BACKEND_HOST: php
NGINX_SERVER_ROOT: /var/www/html/build
NGINX_VHOST_PRESET: $NGINX_VHOST_PRESET
# NGINX_DRUPAL_FILE_PROXY_URL: http://example.com
volumes:
- ./:/var/www/html
# For macOS users (https://wodby.com/stacks/drupal/docs/local/docker-for-mac/)
# - ./:/var/www/html:cached # User-guided caching
# - docker-sync:/var/www/html # Docker-sync
labels:
- "traefik.http.routers.${PROJECT_NAME}_nginx.rule=Host(`${PROJECT_BASE_URL}`)"
mailhog:
image: mailhog/mailhog
container_name: "${PROJECT_NAME}_mailhog"
labels:
- 'traefik.backend=${PROJECT_NAME}_mailhog'
- 'traefik.port=8025'
- 'traefik.frontend.rule=Host:mailhog.${PROJECT_BASE_URL}'
node:
image: wodby/node:$NODE_TAG
container_name: "${PROJECT_NAME}_node"
working_dir: /var/www/html
stdin_open: true
tty: true
labels:
- 'traefik.backend=${PROJECT_NAME}_node'
volumes:
- ./:/var/www/html
command: sh -c 'npm install && npm run build'
# node_app:
# image: wodby/node:$NODE_TAG
# container_name: "${PROJECT_NAME}_node_app"
# working_dir: /var/www/html
# stdin_open: true
# tty: true
# labels:
# - 'traefik.backend=${PROJECT_NAME}_node_app'
# - 'traefik.port=3000'
# - 'traefik.frontend.rule=Host:front.${PROJECT_BASE_URL}'
# expose:
# - "3000"
# volumes:
# - ./:/var/www/html
# command: sh -c 'npm install && npm run build'
traefik:
image: traefik
container_name: "${PROJECT_NAME}_traefik"
command: --api.insecure=true --providers.docker --log.level=INFO
ports:
- '80:80'
- '8081:8080' # Dashboard
volumes:
- /var/run/docker.sock:/var/run/docker.sock