This repository has been archived by the owner on May 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy-docker-compose.yml
103 lines (95 loc) · 3.27 KB
/
deploy-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
version: "3.7"
services:
osoc-frontend:
build:
context: ./frontend_nextjs
args:
NEXT_BASE_PATH: /${PATHPREFIX}/frontend
NEXT_INTERNAL_API_URL: http://${PATHPREFIX}-osoc-backend:8000
NEXT_API_URL: https://sel2-4.ugent.be/${PATHPREFIX}/api
NEXTAUTH_URL: https://sel2-4.ugent.be/${PATHPREFIX}/frontend/api/auth
NODE_ENV: production
ports:
- 3000
environment:
- NEXTAUTH_URL=https://sel2-4.ugent.be/${PATHPREFIX}/frontend/api/auth
- NEXTAUTH_URL_INTERNAL=http://localhost:3000/${PATHPREFIX}/frontend/api/auth
networks:
- proxynet
labels:
- traefik.enable=true
- traefik.http.routers.${PATHPREFIX}-osoc-frontend.rule=Host(`sel2-4.ugent.be`) && PathPrefix(`/${PATHPREFIX}/frontend`)
- traefik.http.routers.${PATHPREFIX}-osoc-frontend.tls=true
- traefik.http.routers.${PATHPREFIX}-osoc-frontend.tls.certresolver=le
- traefik.http.routers.${PATHPREFIX}-osoc-frontend.entrypoints=websecure
# - traefik.http.routers.osoc-frontend.middlewares=osocfrontendpathstrip
# - traefik.http.middlewares.osocfrontendpathstrip.stripprefix.prefixes=${PATHPREFIX}/frontend
- traefik.port=3000
user: "1000:1000"
depends_on:
- osoc-backend
osoc-backend:
build: ./backend
hostname: ${PATHPREFIX}-osoc-backend
ports:
- 8000
environment:
POSTGRES_URL: postgres
POSTGRES_PORT: 5432
POSTGRES_USER: postgres
POSTGRES_PASSWORD: justapassword
POSTGRES_DATABASE: OSOC
REDIS_URL: redis
REDIS_PORT: 6379
REDIS_PASSWORD: justapassword
# SMTP Mail
SMTP_SERVER: smtp.gmail.com
SMTP_SSL_PORT: 465
SENDER_EMAIL: [email protected]
SENDER_PASSWORD: abcPasswordOSOC-group4
# Invite Settings
INVITE_EXPIRE: 4320 #in minutes
PASSWORDRESET_EXPIRE: 30 # in minutes
CHANGE_EMAIL_EXPIRE: 30 # in minutes
PATHPREFIX: /${PATHPREFIX}
DOMAIN: https://sel2-4.ugent.be
FRONTEND_URL: https://sel2-4.ugent.be/${PATHPREFIX}/frontend
networks:
- proxynet
- default
labels:
- traefik.enable=true
- traefik.http.routers.${PATHPREFIX}-osoc-backend.rule=Host(`sel2-4.ugent.be`) && PathPrefix(`/${PATHPREFIX}/api`)
- traefik.http.routers.${PATHPREFIX}-osoc-backend.tls=true
- traefik.http.routers.${PATHPREFIX}-osoc-backend.tls.certresolver=le
- traefik.http.routers.${PATHPREFIX}-osoc-backend.entrypoints=websecure
- traefik.http.routers.${PATHPREFIX}-osoc-backend.middlewares=${PATHPREFIX}-osocbackendpathstrip
- traefik.http.middlewares.${PATHPREFIX}-osocbackendpathstrip.stripprefix.prefixes=/${PATHPREFIX}/api
- traefik.port=8000
user: "1000:1000"
depends_on:
- postgres
- redis
postgres:
image: postgres:latest
restart: unless-stopped
ports:
- 5432
environment:
- POSTGRES_PASSWORD=justapassword
- POSTGRES_DB=OSOC
volumes:
- ./data/postgres:/var/lib/postgresql/data/
redis:
image: redis:latest
restart: always
command: redis-server --save 20 1 --loglevel warning --requirepass justapassword
ports:
- 6379
volumes:
- ./data/redis:/data
user: "1000:1000"
networks:
proxynet:
external:
name: proxy_network