-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
95 lines (90 loc) · 3.05 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
version: '3.1'
services:
# used to proxy the core UI FE and BE requests to the right container
# Core FE is accessible on localhost:33000/
# Core BE is accessible on localhost:33000/graphql
proxy:
image: traefik:2.10 # The official Traefik docker image
command:
#- "--log.level=DEBUG"
- '--api.insecure=true'
- '--providers.docker=true'
- '--providers.docker.exposedbydefault=false'
- '--entrypoints.web.address=:80'
ports:
- '33000:80' # The HTTP port
- '8080:8080' # The Web UI (enabled by --api)
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.traefik.rule=Host(`localhost`)'
- 'traefik.http.routers.traefik.entrypoints=web'
- 'traefik.http.routers.traefik.service=api@internal'
db:
image: postgres:16-alpine
restart: always
environment:
POSTGRES_PASSWORD: duopassword
POSTGRES_USER: duouser
POSTGRES_DB: duo
ports:
- '5432:5432'
volumes:
- ./apps/backend/db_patches/:/docker-entrypoint-initdb.d/
factory:
image: 'ghcr.io/userofficeproject/user-office-factory:develop'
init: true
environment:
- NODE_ENV=development
- DATABASE_HOSTNAME=db
- DATABASE_PORT=5432
- DATABASE_USER=duouser
- DATABASE_PASSWORD=duopassword
- DATABASE_DATABASE=duo
cap_add:
- SYS_ADMIN
depends_on:
- db
frontend:
image: 'ghcr.io/userofficeproject/user-office-frontend:develop'
labels:
- 'traefik.enable=true'
- 'traefik.http.services.frontend.loadbalancer.server.port=8080'
- 'traefik.http.routers.frontend.rule=(Host(`localhost`) && PathPrefix(`/`))'
depends_on:
- backend
backend:
image: 'ghcr.io/userofficeproject/user-office-backend:develop'
environment:
DATABASE_URL: postgres://duouser:duopassword@db:5432/duo
JWT_SECRET: qMyLZALzs229ybdQXNyzYRdju7X784TH
JWT_TOKEN_LIFE: 7d
BASE_URL: localhost:33000
NODE_ENV: development
USER_OFFICE_FACTORY_ENDPOINT: http://factory:4500/generate
AUTH_DISCOVERY_URL: http://host.docker.internal:5001/.well-known/openid-configuration
AUTH_CLIENT_ID: useroffice
AUTH_CLIENT_SECRET: useroffice
TZ: Europe/Stockholm
DATE_FORMAT: dd-MM-yyyy
DATE_TIME_FORMAT: dd-MM-yyyy HH:mm
# INITIAL_USER_OFFICER_EMAIL:
labels:
- 'traefik.enable=true'
- 'traefik.http.services.backend.loadbalancer.server.port=4000'
- 'traefik.http.routers.backend.rule=(Host(`localhost`) && PathPrefix(`/api`, `/preview`, `/downloads`, `/files`, `/download`, `/uploads`, `/graphql`))'
depends_on:
- duo-development-authorization-server
- db
extra_hosts:
- 'host.docker.internal:host-gateway'
duo-development-authorization-server:
image: 'ghcr.io/userofficeproject/user-office-development-authorization-server:develop'
ports:
- 5001:5001
environment:
DATABASE_URL: postgres://duouser:duopassword@db:5432/duo
PORT: 5001
depends_on:
- db