at least now nginx starts.
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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;"]
|
||||
|
||||
|
||||
@@ -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
12
index.html
Normal 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>
|
||||
26
nginx.conf
26
nginx.conf
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user