-
Notifications
You must be signed in to change notification settings - Fork 208
/
compose.yaml
133 lines (127 loc) · 4.2 KB
/
compose.yaml
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
services:
proxy:
image: traefik:v2.4.2
command:
# - "--log.level=DEBUG"
- "--api=true"
- "--api.dashboard=true"
- "--api.insecure=true" # Don't do that in production
- "--providers.docker"
- "--entrypoints.web.address=:80"
# add pilot token service
# - "--pilot.token=3d1bd97f-cb9d-4cde-8112-77ce2f5abc92"
# install plugin rewrite body
# - "--experimental.plugins.plugin-rewrite.modulename=github.com/traefik/plugin-rewritebody"
# - "--experimental.plugins.plugin-rewrite.version=v0.3.1"
labels: {}
# Create basics middlewares
# - "traefik.http.middlewares.my-auth.basicauth.users=test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/"
# - "traefik.http.middlewares.my-compress.compress=true"
# - "traefik.http.middlewares.my-header.headers.customresponseheaders.X-Custom-Response-Header=cinema"
# Create middlewares for plugins
# - "traefik.http.middlewares.my-rewrite.plugin.plugin-rewrite.lastModified=true"
# - "traefik.http.middlewares.my-rewrite.plugin.plugin-rewrite.rewrites[0].regex=ID"
# - "traefik.http.middlewares.my-rewrite.plugin.plugin-rewrite.rewrites[0].replacement=MY-ID"
volumes:
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock
read_only: true
ports:
- target: 80
published: 80
protocol: tcp
mode: host
- target: 8080
published: 8080
protocol: tcp
mode: host
website:
# build: ./website
image: ghcr.io/mmorejon/cinema-website:v2.2.2
command:
- "-usersAPI"
- "http://users:4000/api/users/"
- "-moviesAPI"
- "http://movies:4000/api/movies/"
- "-showtimesAPI"
- "http://showtimes:4000/api/showtimes/"
- "-bookingsAPI"
- "http://bookings:4000/api/bookings/"
labels:
# Enable public access
- "traefik.http.routers.website.rule=PathPrefix(`/`)"
- "traefik.http.services.website.loadbalancer.server.port=8000"
movies:
# build: ./movies
image: ghcr.io/mmorejon/cinema-movies:v2.2.2
command:
- "-mongoURI"
- "mongodb://db:27017/"
# - "-enableCredentials"
# - "true"
# environment:
# MONGODB_USERNAME: "demo"
# MONGODB_PASSWORD: "e3LBVTPdlzxYbxt9"
labels: {}
# Enable public access
# - "traefik.http.routers.movies.rule=PathPrefix(`/api/movies/`)"
# - "traefik.http.services.movies.loadbalancer.server.port=4000"
# Apply middlewares
# - "traefik.http.routers.movies.middlewares=my-header,my-compress"
bookings:
# build: ./bookings
image: ghcr.io/mmorejon/cinema-bookings:v2.2.2
command:
- "-mongoURI"
- "mongodb://db:27017/"
# - "-enableCredentials"
# - "true"
# environment:
# MONGODB_USERNAME: "demo"
# MONGODB_PASSWORD: "e3LBVTPdlzxYbxt9"
labels: {}
# Enable public access
# - "traefik.http.routers.bookings.rule=PathPrefix(`/api/bookings/`)"
# - "traefik.http.services.bookings.loadbalancer.server.port=4000"
showtimes:
# build: ./showtimes
image: ghcr.io/mmorejon/cinema-showtimes:v2.2.2
command:
- "-mongoURI"
- "mongodb://db:27017/"
# - "-enableCredentials"
# - "true"
# environment:
# MONGODB_USERNAME: "demo"
# MONGODB_PASSWORD: "e3LBVTPdlzxYbxt9"
labels: {}
# Enable public access
# - "traefik.http.routers.showtimes.rule=PathPrefix(`/api/showtimes/`)"
# - "traefik.http.services.showtimes.loadbalancer.server.port=4000"
users:
# build: ./users
image: ghcr.io/mmorejon/cinema-users:v2.2.2
command:
- "-mongoURI"
- "mongodb://db:27017/"
# - "-enableCredentials"
# - "true"
# environment:
# MONGODB_USERNAME: "demo"
# MONGODB_PASSWORD: "e3LBVTPdlzxYbxt9"
labels: {}
# Enable public access
# - "traefik.http.routers.users.rule=PathPrefix(`/api/users/`)"
# - "traefik.http.services.users.loadbalancer.server.port=4000"
db:
image: mongo:4.2.23
# ports:
# - target: 27017
# published: 27017
# protocol: tcp
# mode: host
volumes:
- type: bind
source: ./backup
target: /backup