From ca5327ebb0cf8bf8e4692fa8760a8ce5340fca04 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Fri, 13 Aug 2021 01:09:08 +0200 Subject: [PATCH] :sparkles: docker compose --- .docker/env | 1 + docker-compose.yml | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 .docker/env create mode 100644 docker-compose.yml diff --git a/.docker/env b/.docker/env new file mode 100644 index 00000000..595b7ba2 --- /dev/null +++ b/.docker/env @@ -0,0 +1 @@ +MONGO_URL=mongodb://db:27017/fosscord?readPreference=secondaryPreferred diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..5861e12f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,24 @@ +version: "3" +services: + db: + hostname: fosscord_db + image: mongo:latest + volumes: + - ./db:/data/db + restart: unless-stopped + api: + hostname: fosscord_api + image: fosscord/api + depends_on: + - db + ports: + - 3001:3001 + env_file: ./.docker/env + gateway: + hostname: fosscord_gateway + image: fosscord/gateway + depends_on: + - db + ports: + - 3002:3002 + env_file: ./.docker/env \ No newline at end of file