-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
102 lines (95 loc) · 3.1 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
version: '3.5'
networks:
infra-estagio-network:
name: infra-estagio-network
driver: bridge
ipam:
driver: default
config:
- subnet: 10.18.222.0/16
volumes:
minio_storage: { }
services:
### CoreDNS #############################################
fatec-coredns:
image: coredns/coredns
container_name: "estagio-fatec-coredns"
ports:
- "53:53/udp"
- "53:53/tcp"
volumes:
- "./coredns/Corefile:/Corefile"
- "./coredns/etc/:/coredns-config/"
networks:
- infra-estagio-network
### Traefik #############################################
fatec-traefik:
image: "traefik:v2.5"
container_name: "estagio-fatec-traefik"
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- ./traefik/config:/var/traefik/config
- ./traefik/certs:/var/traefik/certs
- ./traefik/log:/var/traefik/log
- ./traefik/traefik.yml:/etc/traefik/traefik.yml
networks:
- infra-estagio-network
### Database #############################################
fatec-db:
image: mysql:8.0-debian
container_name: "fatec-db"
command: --default-authentication-plugin=mysql_native_password
ports:
- "${MYSQL_PORT}:3306"
env_file:
- .env
restart: on-failure
networks:
- infra-estagio-network
environment:
MYSQL_ROOT_PASSWORD: ${LINK_FATEC_DB_PASSWORD}
volumes:
- ${MYSQL_VOLUME_PATH_HOST}:/var/lib/mysql
labels:
- "traefik.tcp.routers.fatec-db.rule=HostSNI(`db.fatec.estagio.com`)"
- "traefik.tcp.routers.fatec-db.entrypoints=db"
- "traefik.tcp.services.fatec-db.loadbalancer.server.port=${MYSQL_PORT}"
- "traefik.docker.network=infra-estagio-network"
- "traefik.enable=true"
### Minio S3 #############################################
minio:
container_name: "estagio-fatec-minio"
image: quay.io/minio/minio:RELEASE.2023-04-07T05-28-58Z.fips
volumes:
- minio_storage:/data
environment:
MINIO_ROOT_USER: "${LINK_FATEC_MINIO_ROOT_USER}"
MINIO_ROOT_PASSWORD: "${LINK_FATEC_MINIO_ROOT_PASSWORD}"
MINIO_HTTP_ENABLE: "true"
networks:
- infra-estagio-network
ports:
- "${LINK_FATEC_MINIO_PORT}:9000"
- "${LINK_FATEC_MINIO_PORT_CONSOLE}:${LINK_FATEC_MINIO_PORT_CONSOLE}"
command: server /data --console-address ":${LINK_FATEC_MINIO_PORT_CONSOLE}"
### Rabbitmq #############################################
fatec-rabbitmq:
image: rabbitmq:3.8-management
container_name: "estagio-fatec-rabbitmq"
environment:
RABBITMQ_DEFAULT_USER: ${LINK_FATEC_RABBIT_USER}
RABBITMQ_DEFAULT_PASS: ${LINK_FATEC_RABBIT_PASSWORD}
ports:
- "${LINK_FATEC_RABBIT_PORT}:5672"
- "${LINK_FATEC_RABBIT_WEB_PORT}:15672"
networks:
- infra-estagio-network
labels:
- "traefik.enable=true"
- "traefik.http.routers.rabbitmq.rule=Host(`rabbitmq.fatec.estagio.com`)"
- "traefik.http.routers.rabbitmq.entrypoints=default"
- "traefik.http.services.rabbitmq.loadbalancer.server.port=15672"