-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
114 lines (114 loc) · 3 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
102
103
104
105
106
107
108
109
110
111
112
113
114
version: "3"
services:
rubiks-traefik:
image:
traefik:v2.1
container_name: rubiks-traefik
restart: always
command:
- "--log.level=ERROR"
- "--api.dashboard=true"
#- "--accesslog=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--providers.docker.network=rubiks-network"
- "--entrypoints.web.address=:80"
- "--entrypoints.maria.address=:3306"
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.rule=Host(`dashboard.localhost`)"
- "traefik.http.routers.api.service=api@internal"
- "traefik.http.routers.api.middlewares=auth"
- "traefik.http.middlewares.auth.basicauth.users=vjlf:$$2y$$05$$hDc1pg5EIJp6Ccxo8kWCF.20P9AgISc2IzYFaKtE19l6DhX.NhTU6"
ports:
- 80:80
- 443:443
- 3306:3306
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- rubiks-network
rubiks-client:
build:
context: ./client
dockerfile: Dockerfile.dev
volumes:
- ./client/:/home/node/app
- rubiksnodemoduleclient:/home/node/app/node_modules
container_name: rubiks-client
labels:
- "traefik.enable=true"
- "traefik.http.routers.rubiks-client.rule=Host(`localhost`)"
- "traefik.http.routers.rubiks-client.entrypoints=web"
ports:
- 0.0.0.0:8080:8080
environment:
- CHOKIDAR_USEPOLLING=true
restart: always
depends_on:
- rubiks-traefik
- rubiks-server
networks:
- rubiks-network
command: sh -c 'npm run serve'
rubiks-server:
build:
context: ./server
dockerfile: Dockerfile.dev
volumes:
- ./server/:/home/node/app
- rubiksnodemoduleserver:/home/node/app/node_modules
container_name: rubiks-server
labels:
- "traefik.enable=true"
- "traefik.http.routers.rubiks-server.rule=Host(`localhost`) && PathPrefix(`/api`)"
- "traefik.http.routers.rubiks-server.middlewares=rubiks-server-stripprefix"
- "traefik.http.middlewares.rubiks-server-stripprefix.stripprefix.prefixes=/api"
- "traefik.http.routers.rubiks-server.entrypoints=web"
environment:
- HOST=0.0.0.0
- PORT=3333
- NODE_ENV=development
- APP_NAME=rubiksmind
- APP_URL=http://0.0.0.0:3333
- CACHE_VIEWS=false
- APP_KEY=dPivoSpeQpBSbC1qPmwQKMZQYvrdDQjw
- DB_CONNECTION=mysql
- DB_HOST=rubiks-maria
- DB_PORT=3306
- DB_USER=rubiks-user
- DB_PASSWORD=root
- DB_DATABASE=rubiksmind
- HASH_DRIVER=bcrypt
restart: always
depends_on:
- rubiks-traefik
- rubiks-maria
networks:
- rubiks-network
rubiks-maria:
image: mariadb:10.4-bionic
container_name: rubiks-maria
labels:
- "traefik.enable=true"
- "traefik.tcp.routers.maria.rule=HostSNI(`*`)"
- "traefik.tcp.routers.maria.entrypoints=maria"
restart: always
depends_on:
- rubiks-traefik
volumes:
- rubiksmariadata:/var/lib/mysql
environment:
MYSQL_DATABASE: rubiksmind
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: rubiks-user
MYSQL_PASSWORD: root
networks:
- rubiks-network
networks:
rubiks-network:
driver: bridge
volumes:
rubiksmariadata:
rubiksnodemoduleserver:
rubiksnodemoduleclient: