docker compose

This commit is contained in:
Flam3rboy 2021-08-13 01:09:08 +02:00
parent ce055e4d72
commit 7a2711de71
2 changed files with 25 additions and 0 deletions

1
.docker/env Normal file
View File

@ -0,0 +1 @@
MONGO_URL=mongodb://db:27017/fosscord?readPreference=secondaryPreferred

24
docker-compose.yml Normal file
View File

@ -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