Andreas Svanberg
2716fc9a77
When a pull request is opened, will deploy that branch to `<reponame>-<branchname>.branch.dsv.su.se` with branch name having `/` replaced with `-` and all characters that do not match `[a-z0-9-]` are removed. Co-authored-by: Andreas Svanberg <andreass@dsv.su.se> Co-committed-by: Andreas Svanberg <andreass@dsv.su.se>
58 lines
1.7 KiB
YAML
58 lines
1.7 KiB
YAML
services:
|
|
whisper-api:
|
|
build:
|
|
context: .
|
|
environment:
|
|
- DBHOST=jdbc:mariadb://whisper-api-db:3306/whisper_api
|
|
- DBUSER=root
|
|
- DBPASS=mariadb
|
|
- OAUTH2_CLIENT_ID=whisper-frontend
|
|
- OAUTH2_CLIENT_SECRET=s3cr3t
|
|
- OAUTH2_AUTH_URI=https://oauth2-${VHOST}/authorize
|
|
- OAUTH2_TOKEN_URI=https://oauth2-${VHOST}/exchange
|
|
- OAUTH2_USER_INFO_URI=https://oauth2-${VHOST}/verify
|
|
depends_on:
|
|
- whisper-api-db
|
|
- whisper-api-oauth2
|
|
networks:
|
|
- whisper-network
|
|
- traefik
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${VHOST}`)"
|
|
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.entrypoints=secure"
|
|
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.tls.certresolver=letsencrypt"
|
|
|
|
whisper-api-db:
|
|
image: mariadb
|
|
restart: on-failure
|
|
networks:
|
|
- whisper-network
|
|
environment:
|
|
- MARIADB_ROOT_PASSWORD=mariadb
|
|
- MARIADB_DATABASE=whisper_api
|
|
- MYSQL_ROOT_HOST=%
|
|
|
|
whisper-api-oauth2:
|
|
build:
|
|
context: https://github.com/dsv-su/toker.git
|
|
dockerfile: embedded.Dockerfile
|
|
restart: on-failure
|
|
networks:
|
|
- traefik
|
|
environment:
|
|
CLIENT_ID: whisper-frontend
|
|
CLIENT_SECRET: s3cr3t
|
|
CLIENT_REDIRECT_URI: https://${VHOST}/login/oauth2/code/su
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-oauth2.rule=Host(`oauth2-${VHOST}`)"
|
|
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-oauth2.entrypoints=secure"
|
|
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-oauth2.tls.certresolver=letsencrypt"
|
|
|
|
networks:
|
|
whisper-network:
|
|
traefik:
|
|
name: traefik
|
|
external: true
|