Add files to dockerize wildduck

This commit is contained in:
thebongy 2020-02-13 17:36:27 +05:30
parent 0b09f1d87e
commit 2fee49abfe
3 changed files with 43 additions and 0 deletions

3
.dockerignore Normal file
View file

@ -0,0 +1,3 @@
node_modules
Dockerfile*
docker-compose*.yml

14
Dockerfile Normal file
View file

@ -0,0 +1,14 @@
FROM node:lts-alpine
RUN apk add --no-cache make git dumb-init python
WORKDIR /wildduck
COPY . .
RUN npm install --production
ENV WILDDUCK_APPDIR=/wildduck \
WILDDUCK_CONFIG=/wildduck/config/default.toml
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD node ${WILDDUCK_APPDIR}/server.js --config=${WILDDUCK_CONFIG}

26
docker-compose.yml Normal file
View file

@ -0,0 +1,26 @@
version: "3.7"
services:
wildduck:
network_mode: host
build: .
ports:
- "8080:8080"
depends_on:
- redis
- mongo
redis:
network_mode: host
image: redis:alpine
volumes:
- /data
expose:
- 6379
mongo:
network_mode: host
image: mongo
restart: always
volumes:
- /data/db
ports:
- 27017