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
18 changes: 13 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,22 @@ services:
- "3306:3306"

nginx:
image: nginx:latest
container_name: nginx-proxy
image: nginx:latest
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
- /etc/letsencrypt:/etc/letsencrypt
- ./data/nginx:/etc/nginx/conf.d
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
ports:
- "80:80"
- "443:443"
depends_on:
- app
restart: always
- certbot

certbot:
image: certbot/certbot
container_name: certbot
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
5 changes: 3 additions & 2 deletions src/main/java/com/example/SucceSS/config/CorsConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ public class CorsConfig {
public static CorsConfigurationSource corsConfigurationSource() {
CorsConfiguration config = new CorsConfiguration();
config.setAllowCredentials(true);
config.setAllowedOrigins(List.of("http://localhost:5173"));
config.setAllowedOrigins(List.of("https://how-was-your-day.vercel.app/oauth"));
config.setAllowedOrigins(List.of(
"http://localhost:5173",
"https://how-was-your-day.vercel.app"));
config.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"));
config.setAllowedHeaders(List.of("*"));
config.setExposedHeaders(List.of("*"));
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ logging.level.org.springframework.security=DEBUG
logging.level.org.springframework.web=DEBUG

# hugging face
spring.huggingface.api.url=${HUGGINGFACE_API_URL}
spring.huggingface.api.url=${HUGGINGFACE_API_URL}

spring.web.resources.static-locations=classpath:/static/, file:./src/main/resources/static/