This repository has been archived by the owner on Oct 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·86 lines (83 loc) · 2.51 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
version: '3'
services:
auth-service.app:
build:
context: .
dockerfile: Dockerfile
args:
WWWGROUP: '${WWWGROUP}'
image: auth-service/app
restart: unless-stopped
tty: true
working_dir: /var/www/html
extra_hosts:
- 'host.docker.internal:host-gateway'
environment:
WWWUSER: '${WWWUSER}'
volumes:
- './:/var/www/html'
networks:
- auth-service
- parking-microservices_internal
labels:
- "traefik.enable=false"
depends_on:
- auth-service.mysql
auth-service.nginx:
image: nginx:alpine
restart: unless-stopped
# Dev Only
ports:
- '${APP_PORT}:80'
tty: true
volumes:
- './:/var/www/html'
- './docker/nginx:/etc/nginx/conf.d'
networks:
- auth-service
- parking-microservices_gateway
- web
labels:
- "traefik.enable=true"
- "traefik.http.routers.auth-service.rule=Host(`auth.${DOMAIN}`)"
- "traefik.http.routers.auth-service.entrypoints=websecure"
- "traefik.http.routers.auth-service.service=auth-service"
- "traefik.http.services.auth-service.loadbalancer.server.port=80"
- "traefik.http.routers.auth-service.tls.certresolver=lets-encrypt"
- "traefik.http.routers.auth-service.tls=true"
- "traefik.docker.network=web"
depends_on:
- auth-service.app
auth-service.mysql:
image: 'mysql/mysql-server:8.0'
ports:
- '${AUTH_DB_PORT}:3306'
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: 1
volumes:
- 'auth-service-mysql:/var/lib/mysql'
networks:
- auth-service
labels:
- "traefik.enable=false"
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-p${DB_PASSWORD}" ]
retries: 3
timeout: 5s
networks:
auth-service:
driver: bridge
parking-microservices_gateway:
external: true
parking-microservices_internal:
external: true
web:
external: true
volumes:
auth-service-mysql:
driver: local