Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/on-release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ jobs:
permissions:
contents: read
packages: write
defaults:
run:
working-directory: ./frontend
steps:
- uses: actions/checkout@v5

Expand Down Expand Up @@ -94,7 +97,7 @@ jobs:
--build-arg VERSION=${VERSION} \
-t ghcr.io/hackyourfuture/course-hub-frontend:${{ steps.get-version.outputs.version }} \
-t ghcr.io/hackyourfuture/course-hub-frontend:latest \
frontend
.
if [ "$DOCKER_PUSH" = "true" ]; then
docker push ghcr.io/hackyourfuture/course-hub-frontend:${{ steps.get-version.outputs.version }}
docker push ghcr.io/hackyourfuture/course-hub-frontend:latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ public class CourseHubApplication {
public static void main(String[] args) {
SpringApplication.run(CourseHubApplication.class, args);
}

}

This file was deleted.

6 changes: 2 additions & 4 deletions backend/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ spring.datasource.password=course_user_password

# Server configuration
server.port=8080
# Configuration for handling forwarded headers (like X-Forwarded-For)
server.forward-headers-strategy=framework

# Session in Redis Configuration
# We want users to stay logged in for 7 days for convenience
spring.session.timeout=7d

open-api.suffix=/api

springdoc.swagger-ui.url=${open-api.suffix}/v3/api-docs
springdoc.swagger-ui.config-url=${open-api.suffix}/v3/api-docs/swagger-config
2 changes: 1 addition & 1 deletion deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ssh user@server
cd /opt/course-hub
```

Docker status
Docker status:
```bash
docker stats
```
Expand Down
11 changes: 5 additions & 6 deletions deployment/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
condition: service_started
course-hub-frontend:
condition: service_started

# Postgres, main data store used by course-hub-backend
postgres:
image: postgres:18
Expand All @@ -31,7 +31,7 @@ services:
- postgres:/var/lib/postgresql
ports:
- "5432:5432"

# Redis, auth session storage used by course-hub-backend
redis:
image: redis:7
Expand All @@ -46,23 +46,22 @@ services:
restart: on-failure
environment:
BACKEND_URL: https://coursehub.hyf.dev/api

course-hub-backend:
image: ghcr.io/hackyourfuture/course-hub-backend:latest
container_name: course-hub-backend
restart: on-failure
environment:
JVM_TOOL_OPTS: -XX:ReservedCodeCacheSize=120M
JAVA_OPTS: -XX:ReservedCodeCacheSize=120M
BPL_JVM_THREAD_COUNT: 20
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/coursehub
SPRING_DATA_REDIS_HOST: redis
OPEN_API_SUFFIX: /api
depends_on:
postgres:
condition: service_started
redis:
condition: service_started

# Agent that monitors whenever new versions of images are published and recreates the containers
watchtower:
image: containrrr/watchtower
Expand Down
1 change: 1 addition & 0 deletions deployment/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Prefix /api;
}

location / {
Expand Down