diff --git a/.gitea/workflows/cicd.yml b/.gitea/workflows/cicd.yml index b920c94..5172877 100644 --- a/.gitea/workflows/cicd.yml +++ b/.gitea/workflows/cicd.yml @@ -28,5 +28,5 @@ jobs: push: true tags: git.stuve.uni-ulm.de/stuve-it/stuve-it-frontend:latest - # - name: Trigger webhook - # run: curl -X POST ${{ secrets.WEBHOOK_URL }} \ No newline at end of file + - name: Trigger webhook + run: curl -X POST ${{ secrets.WEB HOOK_URL }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 4eedf66..aae4a8b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,8 +22,9 @@ COPY --from=build /app/dist /usr/share/nginx/html #copy public folder COPY --from=build /app/public /usr/share/nginx/html -#copy allowed mime types +#copy allowed mime types and nginx config COPY ./nginx/mime.types /etc/nginx/mime.types +COPY ./nginx/nginx.conf /etc/nginx/nginx.conf # Expose port 80 to access the app EXPOSE 80 diff --git a/nginx/nginx.conf b/nginx/nginx.conf new file mode 100644 index 0000000..a294bbc --- /dev/null +++ b/nginx/nginx.conf @@ -0,0 +1,12 @@ +server { + listen 80; + + root /usr/share/nginx/html; # The root directory of your static files + index index.html; # The default index file + + location / { + try_files $uri $uri/ /index.html; # Try to serve the requested file or fallback to /index.html (React Router) + } + + error_log /var/log/nginx/error.log; +} \ No newline at end of file