1
0
mirror of https://github.com/spacebarchat/spacebarchat.git synced 2024-09-19 17:01:47 +02:00

Docker: Begin dockerization

This commit is contained in:
Diego Magdaleno 2021-05-09 10:48:13 -05:00
parent d2ce6334e7
commit 8ee2f7e17f
5 changed files with 32 additions and 1 deletions

0
.docker/data/.keep Normal file
View File

1
.docker/env Normal file
View File

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

View File

@ -0,0 +1,2 @@
replication:
replSetName: "rs0"

4
.gitignore vendored
View File

@ -1,2 +1,4 @@
node_modules/
.DS_STORE
.DS_STORE
.docker/data/*
!.docker/data/.keep

26
docker-compose.yml Normal file
View File

@ -0,0 +1,26 @@
version: "3"
services:
fosscord-gateway:
container_name: gateway
restart: always
build: gateway
ports:
- "3002:3002"
links:
- mongo
env_file: ./.docker/env
fosscord-api:
container_name: api
restart: always
build: api
ports:
- "3001:3001"
mongo:
container_name: mongo
image: mongo
volumes:
- ./.docker/data:/data/db
- ./.docker/mongodb/mongod.conf:/etc/mongod.conf
ports:
- "27017:27017"
command: ["-f", "/etc/mongod.conf"]