Skip to content

Commit ec54b41

Browse files
committed
feat: add docker compose
1 parent 14cb397 commit ec54b41

3 files changed

Lines changed: 42 additions & 0 deletions

File tree

.env.example

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# base64 encoded GAMS license
2+
# In Linux / WSL shell:
3+
# base64 ./gamslice.txt
4+
GAMS_LICENSE="INSERT LICENSE HERE"
5+
6+
# Port that the server should be started on
7+
SERVER_PORT=8000
8+
9+
# URL that the server should be deployed on (without http:// or https://)
10+
URL_SERVER=api.provideq.kit.edu
11+
12+
# URL that the web frontend should be deployed on (without http:// or https://)
13+
URL_WEB=provideq.kit.edu
14+
15+
# Environment mode, either "dev" or "prod"
16+
ENV_MODE=prod

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ out/
4040
### VS Code ###
4141
.vscode/
4242

43+
### Environment variables ###
44+
.env
4345

4446
### virtual envs and python ###
4547
venv/

docker-compose.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
services:
2+
server:
3+
build:
4+
context: .
5+
dockerfile: ./Dockerfile
6+
args:
7+
# base64 encoded GAMS License
8+
- GAMS_LICENSE=${GAMS_LICENSE}
9+
env_file:
10+
- .env
11+
ports:
12+
- "${SERVER_PORT}:8080"
13+
networks:
14+
- traefik_web
15+
labels:
16+
- "traefik.enable=true"
17+
- "traefik.docker.network=traefik_web"
18+
- "traefik.http.routers.toolbox-server-${ENV_MODE}.rule=Host(`${URL_SERVER}`)"
19+
- "traefik.http.routers.toolbox-server-${ENV_MODE}.entrypoints=websecure"
20+
- "traefik.http.routers.toolbox-server-${ENV_MODE}.tls.certResolver=letsencrypt"
21+
22+
networks:
23+
traefik_web:
24+
external: true

0 commit comments

Comments
 (0)