Dockerized this project, after moving it

This commit is contained in:
2021-04-06 20:25:21 +00:00
parent 31efddb14a
commit ae82cffe17
2 changed files with 36 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
FROM node:15
WORKDIR "/app"
COPY package*.json ./
COPY . /app
RUN npm install --production
EXPOSE 4000
ENTRYPOINT ["bash", "-c"]
CMD ["npm run webpack-production && npm run node"]
+28
View File
@@ -0,0 +1,28 @@
version: "3.6"
services:
kingdombattles:
container_name: kingdombattles
build: .
ports:
- 4000
volumes:
- static_volume:/app/public
labels:
- "traefik.enable=true"
- "traefik.http.routers.kingdombattlesrouter.rule=Host(`kingdombattles.net`)"
- "traefik.http.routers.kingdombattlesrouter.entrypoints=websecure"
- "traefik.http.routers.kingdombattlesrouter.tls.certresolver=myresolver"
- "traefik.http.routers.kingdombattlesrouter.service=kingdombattlesservice@docker"
- "traefik.http.services.kingdombattlesservice.loadbalancer.server.port=4000"
networks:
- server-network
volumes:
static_volume:
driver: local
networks:
server-network:
external: true