@@ -5,16 +5,23 @@ services:
55 nginx :
66 image : nginx:latest
77 container_name : nginx
8+ restart : on-failure
89 ports :
910 - " 443:443"
1011 - " 80:80"
1112 volumes :
1213 - ./nginx.conf:/etc/nginx/conf.d/default.conf
1314 - ./certificates:/etc/nginx/certificates
15+ depends_on :
16+ course-hub-backend :
17+ condition : service_started
18+ course-hub-frontend :
19+ condition : service_started
1420 # Postgres, main data store used by course-hub-backend
1521 postgres :
1622 image : postgres:18
1723 container_name : postgres
24+ restart : on-failure
1825 environment :
1926 POSTGRES_USER : course_user
2027 POSTGRES_PASSWORD : course_user_password
@@ -27,25 +34,29 @@ services:
2734 redis :
2835 image : redis:7
2936 container_name : redis
37+ restart : on-failure
3038 volumes :
3139 - redis:/data
3240 ports :
3341 - " 6379:6379"
3442 course-hub-frontend :
3543 image : ghcr.io/hackyourfuture/course-hub-frontend:latest
3644 container_name : course-hub-frontend
45+ restart : on-failure
3746 environment :
3847 BACKEND_URL : https://coursehub.hyf.dev/api
3948 ports :
4049 - " 3000:3000"
4150 course-hub-backend :
4251 image : ghcr.io/hackyourfuture/course-hub-backend:latest
4352 container_name : course-hub-backend
53+ restart : on-failure
4454 environment :
45- JVM_TOOL_OPTS : -XX:ReservedCodeCacheSize=80M
55+ JVM_TOOL_OPTS : -XX:ReservedCodeCacheSize=120M
4656 BPL_JVM_THREAD_COUNT : 20
4757 SPRING_DATASOURCE_URL : jdbc:postgresql://postgres:5432/coursehub
4858 SPRING_DATA_REDIS_HOST : redis
59+ OPEN_API_SUFFIX : /api
4960 depends_on :
5061 postgres :
5162 condition : service_started
@@ -56,6 +67,8 @@ services:
5667 # Agent that monitors whenever new versions of images are published and recreates the containers
5768 watchtower :
5869 image : containrrr/watchtower
70+ container_name : watchtower
71+ restart : on-failure
5972 volumes :
6073 - /var/run/docker.sock:/var/run/docker.sock
6174 command : --interval 30
0 commit comments