-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose-example.yml
53 lines (50 loc) · 1.28 KB
/
docker-compose-example.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
version: "3"
services:
nginx-proxy:
image: "nginx-proxy/nginx-proxy"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
#- "./nginx/custom.conf:/etc/nginx/conf.d/my_custom_proxy_settings.conf"
ports:
- "80:80"
environment:
- HTTPS_METHOD=nohttps
- HSTS=off
networks:
- frontend
drupal-example:
image: "sparkpos/docker-nginx-php:7.4-alpine"
volumes:
- ~/your-code:/var/www/html
environment:
- VIRTUAL_HOST=example.dev,example.local
- DRUPAL_WEB_ROOT=web
- HTTP_HEADER_X_FRAME_OPTIONS="allow-from example.com"
- "HTTP_HEADER_X_CONTENT_SECURITY_POLICY=default-src 'self' data: 'unsafe-inline' 'unsafe-eval' *.google.com *.baidu.com unpkg.com *.gstatic.com *.googleapis.com;"
hostname: "example.docker"
networks:
- frontend
- backend
mysql:
image: mariadb:10.5
ports:
- "3306:3306"
volumes:
- ~/storage/mariadb:/var/lib/mysql
- ./etc/mysql/my.cnf:/etc/my.cnf
privileged: true
environment:
TZ: 'Asia/Shanghai'
MYSQL_ROOT_PASSWORD: "password"
MYSQL_ROOT_HOST: "%"
networks:
- backend
networks:
frontend:
driver: bridge
ipam:
driver: default
backend:
driver: bridge
ipam:
driver: default