Implement database connection

This commit is contained in:
2022-09-25 14:40:07 +02:00
parent 2726baa6bd
commit 1fd741861e
11 changed files with 221 additions and 7 deletions

1
db/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
secret.env

19
db/docker-compose.yml Normal file
View File

@@ -0,0 +1,19 @@
# Use root/example as user/password credentials
version: '3.1'
services:
mongo:
image: mongo
restart: always
ports:
- 27017:27017
env_file:
- secret.env
mongo-express:
image: mongo-express
restart: always
ports:
- 8081:8081
env_file:
- secret.env

5
db/secret.env.example Normal file
View File

@@ -0,0 +1,5 @@
MONGO_INITDB_ROOT_USERNAME="user"
MONGO_INITDB_ROOT_PASSWORD="pass"
ME_CONFIG_MONGODB_ADMINUSERNAME="user"
ME_CONFIG_MONGODB_ADMINPASSWORD="pass"
ME_CONFIG_MONGODB_URL="mongodb://user:pass@mongo:27017/"