Skip to content
This repository has been archived by the owner on Feb 19, 2025. It is now read-only.

Commit

Permalink
fix deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Niklas Kerkhoff committed Nov 19, 2024
1 parent 068ef3f commit 66a5456
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 19 deletions.
31 changes: 26 additions & 5 deletions deployment/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ services:
image: nginx:1.27
container_name: tutor-assistant-nginx-proxy
restart: always
ports:
- "80:80"
volumes:
- ./tutor-assistant-nginx-proxy.conf:/etc/nginx/nginx.conf:ro
networks:
- tutor-assistant
- reverse-proxy
depends_on:
- tutor-assistant-web
- tutor-assistant-app-service
Expand All @@ -20,11 +21,15 @@ services:
- env/.tutor-assistant.env
volumes:
- ./data/tutor-assistant-data:/var/lib/tutor-assistant/data
networks:
- tutor-assistant

tutor-assistant-web:
image: zaeunepyrite01/tutor-assistant-web:latest
container_name: tutor-assistant-web
restart: always
networks:
- tutor-assistant

tutor-assistant-app-service:
image: zaeunepyrite01/tutor-assistant-app-service:latest
Expand All @@ -36,8 +41,8 @@ services:
- env/.tutor-assistant-app-service.env
volumes:
- ./data/tutor-assistant-app-service-logs:/var/log/tutor-assistant-app-service-logs
extra_hosts:
- myhost:host-gateway
networks:
- tutor-assistant

tutor-assistant-app-service-postgres:
image: postgres:16.4-alpine3.20
Expand All @@ -47,6 +52,8 @@ services:
- env/.tutor-assistant-app-service-postgres.env
volumes:
- ./data/tutor-assistant-app-service-postgres-data:/var/lib/postgresql/data
networks:
- tutor-assistant

tutor-assistant-keycloak:
image: quay.io/keycloak/keycloak:25.0.4
Expand All @@ -57,6 +64,8 @@ services:
- tutor-assistant-keycloak-postgres
env_file:
- env/.tutor-assistant-keycloak.env
networks:
- tutor-assistant

tutor-assistant-keycloak-postgres:
image: postgres:16.4-alpine3.20
Expand All @@ -66,17 +75,29 @@ services:
- env/.tutor-assistant-keycloak-postgres.env
volumes:
- ./data/tutor-assistant-keycloak-postgres-data:/var/lib/postgresql/data
networks:
- tutor-assistant

tutor-assistant-seaweedfs-master:
image: chrislusf/seaweedfs
container_name: tutor-assistant-seaweedfs-master
restart: always
command: 'master'
networks:
- tutor-assistant

tutor-assistant-seaweedfs-volume:
image: chrislusf/seaweedfs
container_name: tutor-assistant-seaweedfs-volume
restart: always
command: 'volume -mserver tutor-assistant-seaweedfs-master:9333 -dir /var/lib/seaweedfs/data'
command: 'volume -mserver tutor-assistant-seaweedfs-master:9333 -dir /var/lib/seaweedfs/data -publicUrl tutor-assistant-seaweedfs-volume:8080'
volumes:
- ./data/tutor-assistant-seaweedfs-volume-data:/var/lib/seaweedfs/data
networks:
- tutor-assistant

networks:
reverse-proxy:
external: true
tutor-assistant:
external: false
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
POSTGRES_USER=postgres
POSTGRES_PASSWORD=password
POSTGRES_USER=<...>
POSTGRES_PASSWORD=<...>
POSTGRES_DB=tutor-assistant-app-service
7 changes: 4 additions & 3 deletions deployment/template-env/.tutor-assistant-app-service.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
SPRING_DATASOURCE_USERNAME=postgres
SPRING_DATASOURCE_PASSWORD=password
SPRING_DATASOURCE_USERNAME=<...>
SPRING_DATASOURCE_PASSWORD=<...>
SPRING_DATASOURCE_HOST=tutor-assistant-app-service-postgres:5432
KEYCLOAK_ISSUER_URI=http://myhost/auth/realms/tutor-assistant
ROOT_LOG_LEVEL=info
KEYCLOAK_ISSUER_URI=https://<...>/auth/realms/tutor-assistant
TUTOR_ASSISTANT_BASE_URL=http://tutor-assistant:8500
SEAWEEDFS_MASTER_URL=http://tutor-assistant-seaweedfs-master:9333/dir/assign
LOGS_PATH=/var/log/tutor-assistant-app-service-logs/tutor-assistant-app-service.log
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
POSTGRES_DB=tutor-assistant-keycloak
POSTGRES_USER=user
POSTGRES_PASSWORD=password
POSTGRES_USER=<...>
POSTGRES_PASSWORD=<...>
14 changes: 8 additions & 6 deletions deployment/template-env/.tutor-assistant-keycloak.env
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
KC_PROXY_ADDRESS_FORWARDING=true
KC_HOSTNAME_STRICT=false
KC_HOSTNAME_STRICT_HTTPS=false
KC_HOSTNAME=https://<...>/auth
KC_HOSTNAME_STRICT=true
KC_HOSTNAME_STRICT_HTTPS=true
KC_HTTP_RELATIVE_PATH=/auth
KEYCLOAK_FRONTEND_URL=https://<...>/auth
KC_PROXY=edge
KC_HTTP_ENABLED=true
KC_HTTP_ENABLED=false
KC_DB=postgres
KC_DB_USERNAME=user
KC_DB_PASSWORD=password
KC_DB_USERNAME=<...>
KC_DB_PASSWORD=<...>
KC_DB_URL_HOST=tutor-assistant-keycloak-postgres
KC_DB_URL_PORT=5432
KC_DB_URL_DATABASE=tutor-assistant-keycloak
KEYCLOAK_ADMIN=admin
KEYCLOAK_ADMIN_PASSWORD=password
KEYCLOAK_ADMIN_PASSWORD=<...>
2 changes: 1 addition & 1 deletion deployment/template-env/.tutor-assistant.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
DATA_DIR=/var/lib/tutor-assistant/data
HOST=tutor-assistant
OPENAI_API_KEY=your-key
OPENAI_API_KEY=<...>

0 comments on commit 66a5456

Please sign in to comment.