add development proxy (nginx instance)

This commit is contained in:
Jörn-Michael Miehe 2020-09-06 01:53:13 +02:00
parent 692fd4d9d6
commit 5681c917ea
4 changed files with 38 additions and 1 deletions

4
dev-proxy/Dockerfile Normal file
View file

@ -0,0 +1,4 @@
FROM nginx:stable-alpine
LABEL maintainer="joern-michael.miehe@lenaisten.de"
COPY nginx.conf /etc/nginx/conf.d/default.conf

23
dev-proxy/nginx.conf Normal file
View file

@ -0,0 +1,23 @@
upstream ui {
server ui:8080;
}
# upstream api {
# server api:3000;
# }
server {
listen 80 default_server;
server_name _;
error_log /dev/stderr;
access_log /dev/stdout;
location / {
proxy_pass http://ui;
}
# location /api/ {
# proxy_pass http://api;
# }
}

View file

@ -12,5 +12,9 @@ services:
- "${PWD}/ui:/srv/vue/bday2020"
ports:
- 8000:8000
- 8080:8080
dev-proxy:
build: dev-proxy
restart: 'no'
ports:
- 8080:80

6
ui/vue.config.js Normal file
View file

@ -0,0 +1,6 @@
// vue.config.js
module.exports = {
devServer: {
disableHostCheck: true
}
}