-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
61 lines (60 loc) · 1.67 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
version: '3'
services:
app:
build:
context: ./
target: ww-dev
args:
WWWGROUP: '${WWWGROUP}'
volumes:
- .:/var/www/html
- .env:/var/www/html/.env
ports:
- '${APP_PORT:-80}:80'
environment:
- APP_ENV=local
- APP_DEBUG=true
networks:
- proxy
- laravel
depends_on:
- mysql
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.routers.${PF}.rule=PathPrefix(`/`)"
- "traefik.http.routers.${PF}.entryPoints=web"
- "traefik.http.routers.${PF}-ssl.rule=PathPrefix(`/`)"
- "traefik.http.routers.${PF}-ssl.entryPoints=websecure"
- "traefik.http.routers.${PF}-ssl.tls=true"
- "traefik.http.routers.${PF}-ssl.tls.certresolver=myresolver"
- "traefik.http.routers.${PF}-ssl.tls.domains[0].main=${DOMAIN}"
- "traefik.http.routers.${PF}-ssl.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.${PF}.rule=Host(`${DOMAIN}`)"
mysql:
image: 'mysql/mysql-server:8.0'
environment:
environment:
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
MYSQL_ROOT_HOST: '%'
MYSQL_DATABASE: '${DB_DATABASE}'
MYSQL_USER: '${DB_USERNAME}'
MYSQL_PASSWORD: '${DB_PASSWORD}'
MYSQL_ALLOW_EMPTY_PASSWORD: 0
ports:
- 3907:3306
volumes:
# - 'mysql8:/var/lib/mysql'
- './db/init.sql:/docker-entrypoint-initdb.d/01init.sql'
- ./db_data:/var/lib/mysql
networks:
- laravel
networks:
laravel:
driver: bridge
proxy:
#driver: bridge
external: true
volumes:
mysql8:
driver: local