diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-08-13 01:09:08 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-08-13 01:09:08 +0200 |
commit | ca5327ebb0cf8bf8e4692fa8760a8ce5340fca04 (patch) | |
tree | 99bd2a3b6c78a8cc7a80c643fb534a803fb4ec2b | |
parent | Merge pull request #256 from luth31/master (diff) | |
download | server-ca5327ebb0cf8bf8e4692fa8760a8ce5340fca04.tar.xz |
:sparkles: docker compose
-rw-r--r-- | .docker/env | 1 | ||||
-rw-r--r-- | docker-compose.yml | 24 |
2 files changed, 25 insertions, 0 deletions
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 |