From 5b1d0d19b17404f4da0c3123b4b66836bbc84a97 Mon Sep 17 00:00:00 2001 From: Callum Chaney <35102876+CallumChaney@users.noreply.github.com> Date: Sun, 21 Jun 2020 20:52:06 +0100 Subject: [PATCH] Added a docker file that works on windows (#21) * Created docker-compose.yml.windows --- server/docker-compose.windows.yml | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 server/docker-compose.windows.yml diff --git a/server/docker-compose.windows.yml b/server/docker-compose.windows.yml new file mode 100644 index 0000000..488b818 --- /dev/null +++ b/server/docker-compose.windows.yml @@ -0,0 +1,41 @@ +version: "3.7" +services: + db: + image: mongo:4 + restart: always + volumes: + - mongodb:/data/db + ports: + - 27018:${MONGO_PORT} + environment: + MONGO_INITDB_ROOT_USERNAME: ${MONGO_ROOT_USER} + MONGO_INITDB_ROOT_PASSWORD: ${MONGO_ROOT_PASSWORD} + + api: + # TODO: wait for mongodb to be available... + image: entropychat.api + build: . + restart: on-failure + depends_on: + - db + volumes: + - ./:/usr/src/app:cached + - npm_cache:/root/.npm:delegated + - node_modules:/app/node_modules:delegated + ports: + - ${PORT}:${PORT} + environment: + PORT: ${PORT} + JWT_SECRET: ${JWT_SECRET} + GITHUB_CLIENT_ID: ${GITHUB_CLIENT_ID} + GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET} + MONGO_HOST: ${MONGO_HOST} + MONGO_PORT: ${MONGO_PORT} + MONGO_DB_NAME: ${MONGO_DB_NAME} + MONGO_ROOT_USER: ${MONGO_ROOT_USER} + MONGO_ROOT_PASSWORD: ${MONGO_ROOT_PASSWORD} + +volumes: + npm_cache: + node_modules: + mongodb: