1
1
mirror of https://github.com/derogab/ITAvsCOVIDbot synced 2024-12-26 15:32:34 +01:00

Minor improvements

This commit is contained in:
Gabriele De Rosa 2021-05-21 03:28:16 +02:00
parent e2d7886158
commit 374d90b8e3
2 changed files with 5 additions and 9 deletions

2
bot.py
View File

@ -52,7 +52,7 @@ mongodb_pass = os.environ.get('MONGODB_PASS')
if mongodb_user is None or mongodb_pass is None:
print('No mongodb auth.')
exit()
mongodb_uri = 'mongodb://' + mongodb_user + ':' + mongodb_pass + '@db:27017',
mongodb_uri = 'mongodb://' + mongodb_user + ':' + mongodb_pass + '@db:27017'
# Init mongodb database
client = MongoClient(mongodb_uri)

View File

@ -1,14 +1,15 @@
version: "3.5"
version: '3.7'
networks:
itavscovidbot.network:
name: itavscovidbot.network
driver: bridge
services:
db:
image: mongo
image: mongo:latest
container_name: itavscovidbot.db
restart: unless-stopped
env_file:
@ -21,11 +22,9 @@ services:
db.web:
depends_on:
- db
image: mongo-express
image: mongo-express:latest
container_name: itavscovidbot.db.web
restart: unless-stopped
links:
- db
env_file:
- ./db/web/.env
ports:
@ -36,13 +35,10 @@ services:
app:
depends_on:
- db
- db.web
build:
context: .
container_name: itavscovidbot.app
restart: unless-stopped
links:
- db
env_file:
- ./.env
networks: