diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..8c809d8 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +node_modules +Dockerfile* +docker-compose*.yml \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b32446d --- /dev/null +++ b/Dockerfile @@ -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} diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..281db2e --- /dev/null +++ b/docker-compose.yml @@ -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