100% dockerized

This commit is contained in:
nicco 2018-07-26 11:42:38 +02:00
parent f362c5770d
commit 7b7c95c17a
4 changed files with 50 additions and 17 deletions

View File

@ -1,9 +0,0 @@
version: "3.5"
services:
cache:
build: .
user: nobody
ports:
- 8000:8000
restart: always

8
cache/dockerfile vendored
View File

@ -1,8 +0,0 @@
FROM node:alpine
WORKDIR /app
USER nobody
COPY ./app.js ./.key ./
ENTRYPOINT [ "node" ]
CMD [ "app.js" ]

36
docker-compose.yml Normal file
View File

@ -0,0 +1,36 @@
version: '3'
services:
frontend:
image: nginx:alpine
restart: always
ports:
- 80:80
volumes:
- ./app:/srv
- ./nginx.conf:/etc/nginx/conf.d/default.conf
networks:
- dvb
- traefik
labels:
- traefik.enable=true
- traefik.port=80
- traefik.backend=dvb
- traefik.frontend.rule=Host:wundtstr.club
cache:
image: node:alpine
command: node /app.js
volumes:
- ./cache/app.js:/app.js
- ./cache/.key:/.key
ports:
- 8000
networks:
- dvb
restart: always
networks:
dvb:
traefik:
external: true

14
nginx.conf Normal file
View File

@ -0,0 +1,14 @@
server{
listen 80;
server_name _;
location / {
root /srv;
# Activate the next line if you want to list files
# autoindex on;
}
location /cache/ {
proxy_pass http://cache:8000/;
}
}