-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.local-production.yml
79 lines (74 loc) Β· 2.69 KB
/
docker-compose.local-production.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
version: '3.5'
services:
reverse-proxy:
image: traefik
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
ports:
- 80:80
- 8080:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- rosalution-network
labels:
- "traefik.enable=true"
- "traefik.docker.network=rosalution-network"
frontend:
build:
context: ./frontend/
target: production-stage
dockerfile: Dockerfile
args:
VERSION_BUILD_TAG: "local-production@latest"
# image: ghcr.io/uab-cgds-worthey/rosalution/frontend:${ROSALUTION_VERSION}
networks:
- rosalution-network
labels:
- "traefik.enable=true"
- "traefik.docker.network=rosalution-network"
- "traefik.http.routers.frontend-router.entrypoints=web"
- "traefik.http.routers.frontend-router.rule=Host(`localhost`)"
- "traefik.http.routers.frontend-router.rule=PathPrefix(`/rosalution`)"
- "traefik.http.routers.frontend-router.middlewares=frontend-strip-prefix"
- "traefik.http.middlewares.frontend-strip-prefix.stripprefix.prefixes=/rosalution"
- "traefik.http.routers.frontend-router.service=frontend-web-service"
- "traefik.http.services.frontend-web-service.loadbalancer.server.port=80"
backend:
build:
context: ./backend/
target: production-stage
dockerfile: Dockerfile
# image: ghcr.io/uab-cgds-worthey/rosalution/backend:${ROSALUTION_VERSION}
networks:
- rosalution-network
environment:
- ROSALUTION_ENV=production
- MONGODB_HOST=rosalution-db
entrypoint: ['/bin/sh', '-c', './entrypoint-init.sh']
labels:
- "traefik.enable=true"
- "traefik.docker.network=rosalution-network"
- "traefik.http.routers.backend-router.entrypoints=web"
- "traefik.http.routers.backend-router.rule=PathPrefix(`/rosalution/api`)"
- "traefik.http.routers.backend-router.service=backend-api-service"
- "traefik.http.routers.backend-router.middlewares=backend-strip-prefix"
- "traefik.http.middlewares.backend-strip-prefix.stripprefix.prefixes=/rosalution/api"
- "traefik.http.services.backend-api-service.loadbalancer.server.port=8000"
rosalution-db:
build:
context: ./etc/fixtures/
target: production-stage
dockerfile: production.Dockerfile
# image: ghcr.io/uab-cgds-worthey/rosalution/database-fixture:${ROSALUTION_VERSION}
networks:
- rosalution-network
environment:
MONGO_INITDB_DATABASE: rosalution_db
networks:
rosalution-network:
name: rosalution-network