fix(docker): added nginx config and added webhook to cicd
Build and Push Docker image / build-and-push (push) Successful in 1m46s Details

This commit is contained in:
Valentin Kolb 2024-05-13 20:33:17 +02:00
parent 1afa7596d0
commit 057927e835
3 changed files with 16 additions and 3 deletions

View File

@ -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 }}
- name: Trigger webhook
run: curl -X POST ${{ secrets.WEB HOOK_URL }}

View File

@ -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

12
nginx/nginx.conf Normal file
View File

@ -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;
}