mirror of
https://github.com/derogab/ITAvsCOVIDbot
synced 2024-12-27 07:52:24 +01:00
Minor improvements
This commit is contained in:
parent
e2d7886158
commit
374d90b8e3
2
bot.py
2
bot.py
@ -52,7 +52,7 @@ mongodb_pass = os.environ.get('MONGODB_PASS')
|
|||||||
if mongodb_user is None or mongodb_pass is None:
|
if mongodb_user is None or mongodb_pass is None:
|
||||||
print('No mongodb auth.')
|
print('No mongodb auth.')
|
||||||
exit()
|
exit()
|
||||||
mongodb_uri = 'mongodb://' + mongodb_user + ':' + mongodb_pass + '@db:27017',
|
mongodb_uri = 'mongodb://' + mongodb_user + ':' + mongodb_pass + '@db:27017'
|
||||||
# Init mongodb database
|
# Init mongodb database
|
||||||
client = MongoClient(mongodb_uri)
|
client = MongoClient(mongodb_uri)
|
||||||
|
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
version: "3.5"
|
version: '3.7'
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
itavscovidbot.network:
|
itavscovidbot.network:
|
||||||
name: itavscovidbot.network
|
name: itavscovidbot.network
|
||||||
|
driver: bridge
|
||||||
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: mongo
|
image: mongo:latest
|
||||||
container_name: itavscovidbot.db
|
container_name: itavscovidbot.db
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file:
|
env_file:
|
||||||
@ -21,11 +22,9 @@ services:
|
|||||||
db.web:
|
db.web:
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
image: mongo-express
|
image: mongo-express:latest
|
||||||
container_name: itavscovidbot.db.web
|
container_name: itavscovidbot.db.web
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
links:
|
|
||||||
- db
|
|
||||||
env_file:
|
env_file:
|
||||||
- ./db/web/.env
|
- ./db/web/.env
|
||||||
ports:
|
ports:
|
||||||
@ -36,13 +35,10 @@ services:
|
|||||||
app:
|
app:
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
- db.web
|
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
container_name: itavscovidbot.app
|
container_name: itavscovidbot.app
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
links:
|
|
||||||
- db
|
|
||||||
env_file:
|
env_file:
|
||||||
- ./.env
|
- ./.env
|
||||||
networks:
|
networks:
|
||||||
|
Loading…
Reference in New Issue
Block a user