-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
155 lines (155 loc) · 4.09 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
---
version: "3.7"
networks:
ffs:
services:
proxy:
# https://hub.docker.com/_/traefik?tab=description
image: "traefik:1.7.9-alpine"
command:
- "traefik"
- "--api"
- "--docker"
- "--docker.domain=localhost"
- "--docker.exposedbydefault=false"
# - "--entryPoints=Name:http Address::80 Redirect.EntryPoint:https"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
# - "./config/traefik:/etc/traefik"
# - "./ssl:/etc/cert"
ports:
- "80:80"
- "443:443"
- "8080:8080"
networks:
ffs:
aliases:
# - web
- traefik
- "app-ffs.localhost"
- "api-ffs.localhost"
labels:
- "traefik.enable=true"
- "traefik.port=8080"
- "traefik.backend=traefik-server"
- "traefik.frontend.rule=Host:proxy.localhost"
#https://hub.docker.com/_/maven?tab=description
api:
image: "maven:3.6.0-jdk-8-alpine"
depends_on:
- "db"
- "broker"
command: "mvn clean compile exec:exec@run -U"
working_dir: "/FFS-Api/"
environment:
MAVEN_CONFIG: /root/.m2
volumes:
- "./data/maven-repo:/root/.m2"
- "./src/ApiLib/:/ApiLib/"
- "./src/FFS-Api/:/FFS-Api/"
- "./data/config-api:/FFS-Api/config"
- "./src/FFS-PubSub/:/FFS-PubSub/"
networks:
ffs:
aliases:
- api
labels:
- "traefik.enable=true"
- "traefik.backend=api"
- "traefik.port=4000"
- "traefik.frontend.rule=Host:api-ffs.localhost"
pubsub:
image: "maven:3.6.0-jdk-8-alpine"
depends_on:
- "db"
- "broker"
command: "mvn clean compile exec:exec@run -U"
working_dir: "/FFS-PubSub/"
environment:
MAVEN_CONFIG: /root/.m2
volumes:
- "./data/maven-repo:/root/.m2"
- "./src/ApiLib/:/ApiLib/"
- "./src/FFS-Api/:/FFS-Api/"
- "./data/config-pubsub:/FFS-PubSub/config"
- "./src/FFS-PubSub/:/FFS-PubSub/"
networks:
ffs:
aliases:
- pubsub
labels:
- "traefik.enable=true"
- "traefik.backend=pubsub"
- "traefik.port=8009"
- "traefik.frontend.rule=Host:pubsub-ffs.localhost"
# docker run -v ~/.m2:/var/maven/.m2 -ti --rm -u 1000 -e MAVEN_CONFIG=/var/maven/.m2 maven mvn -Duser.home=/var/maven archetype:generate
app-ffs:
image: "node:8.15.0-alpine"
depends_on:
- "api"
volumes:
- "./src/ffs-zera/:/ffs-zera/"
working_dir: /ffs-zera/
command:
npm run start:docker
# - "./id_rsa:/root/id_rsa"
environment:
DEV_SERVER_HOST: "0.0.0.0"
DEV_SERVER_PORT: 3000
ports:
- "3000:3000"
networks:
ffs:
aliases:
- app
labels:
- "traefik.enable=true"
- "traefik.port=3000"
- "traefik.backend=app-ffs"
- "traefik.frontend.rule=Host:app-ffs.localhost"
# - "traefik.frontend.redirect.regex=^https?://app-ffs.localhost/.*"
# - "traefik.frontend.redirect.replacement=https://app-ffs.localhost/"
# https://hub.docker.com/_/mariadb?tab=description
db:
image: "mariadb:10.4.2"
ports:
- "3306:3306"
volumes:
- ./src/FFS-Api/database/:/docker-entrypoint-initdb.d/
- ./data/mariadb:/var/lib/mysql
# - "mongo_data:/data/db"
# - "./data/db_dumps:/db_dumps"
networks:
ffs:
aliases:
- mariadb
# command: "--auth"
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: ffs
MYSQL_USER: ffs-user
MYSQL_PASSWORD: ffs-user
labels:
- "traefik.enable=false"
#https://hub.docker.com/_/rabbitmq
broker:
image: "rabbitmq:3.7.9-management-alpine"
environment:
RABBITMQ_DEFAULT_USER: ffs-user
RABBITMQ_DEFAULT_PASS: ffs-user
RABBITMQ_DEFAULT_VHOST: ffs
ports:
- "15672:15672"
- "5672:5672"
# volumes:
# - "rabbitmq_data:/var/lib/rabbitmq"
networks:
ffs:
aliases:
- rabbit
- rabbitmq
labels:
- "traefik.enable=true"
- "traefik.backend=broker"
- "traefik.port=15672"
- "traefik.frontend.rule=Host:broker.localhost"