diff --git a/api/Dockerfile b/api/Dockerfile new file mode 100644 index 0000000..79b8ac5 --- /dev/null +++ b/api/Dockerfile @@ -0,0 +1,4 @@ +FROM node:lts-alpine +LABEL maintainer="joern-michael.miehe@lenaisten.de" + +CMD [ "tail", "-f", "/dev/null" ] diff --git a/dev-proxy/Dockerfile b/dev-proxy/Dockerfile index 9b47d13..51c5273 100644 --- a/dev-proxy/Dockerfile +++ b/dev-proxy/Dockerfile @@ -1,4 +1,4 @@ FROM nginx:stable-alpine LABEL maintainer="joern-michael.miehe@lenaisten.de" -COPY nginx.conf /etc/nginx/conf.d/default.conf \ No newline at end of file +COPY nginx.conf /etc/nginx/conf.d/default.conf diff --git a/dev-proxy/nginx.conf b/dev-proxy/nginx.conf index de19e86..b676378 100644 --- a/dev-proxy/nginx.conf +++ b/dev-proxy/nginx.conf @@ -2,9 +2,9 @@ upstream ui { server ui:8080; } -# upstream api { -# server api:3000; -# } +upstream api { + server api:3000; +} server { listen 80 default_server; @@ -16,8 +16,8 @@ server { location / { proxy_pass http://ui; } - - # location /api/ { - # proxy_pass http://api; - # } + + location /api/ { + proxy_pass http://api; + } } diff --git a/docker-compose.yml b/docker-compose.yml index f6da609..73d105b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,8 +13,15 @@ services: ports: - 8000:8000 + api: + build: api + restart: 'no' + dev-proxy: build: dev-proxy restart: 'no' ports: - 8080:80 + depends_on: + - ui + - api