at least now nginx starts.

This commit is contained in:
usr0
2026-02-11 15:48:55 +01:00
parent 5d50f29b47
commit b8e322d7be
5 changed files with 49 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ services:
depends_on:
- db
- etherpad
- back
networks:
- app-network
@@ -18,6 +19,7 @@ services:
ports:
- "5000:5000"
- "5080:80"
volumes:
- ../doodlestudent/front:/app
environment:

View File

@@ -14,7 +14,7 @@ FROM nginx:alpine
COPY --from=build /app/dist/tlcfront /usr/share/nginx/html
EXPOSE 80 5000
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

View File

@@ -1,2 +1,9 @@
FROM nginx:latest
COPY dockerfiles/nginx/nginx.conf /etc/nginx/conf.d/default.conf
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY index.html /usr/share/nginx/html/
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

12
index.html Normal file
View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>yippee</title>
</head>
<body>
<h1>Hello, people!</h1>
<p>coolz</p>
</body>
</html>

View File

@@ -0,0 +1,26 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
##########################
# Proxy API requests to the back service
##########################
location /api/ {
proxy_pass http://back:8080/api/;
proxy_http_version 1.1;
proxy_set_header Host $host;
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 Connection "";
}
##########################
# FrontEnd returns
##########################
location / {
try_files $uri $uri/ /index.html;
}
}