Add docker-compose.yml
This commit is contained in:
parent
f798d9c464
commit
56fe365d91
|
@ -68,3 +68,4 @@ cython_debug/
|
|||
.python-version
|
||||
.vscode/*
|
||||
*.obj
|
||||
*_data
|
|
@ -13,8 +13,8 @@ if __name__ == "__main__":
|
|||
conn = psycopg2.connect(
|
||||
host="localhost",
|
||||
database="bd2",
|
||||
user="pawUser",
|
||||
password="pawUser")
|
||||
user="root",
|
||||
password="password")
|
||||
cur = conn.cursor()
|
||||
cur.execute('SELECT version()')
|
||||
print(cur.fetchone())
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
mongo:
|
||||
image: mongo
|
||||
container_name: bsition-mongo
|
||||
environment:
|
||||
- MONGO_INITDB_ROOT_USERNAME=root
|
||||
- MONGO_INITDB_ROOT_PASSWORD=password
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "27017:27017"
|
||||
volumes:
|
||||
- ./mongo_data/db:/data/db
|
||||
- ./mongo_data/dev.archive:/Databases/dev.archive
|
||||
- ./mongo_data/production:/Databases/production
|
||||
|
||||
postgres:
|
||||
image: postgres
|
||||
container_name: bsition-postgres
|
||||
ports:
|
||||
- "5432:5432"
|
||||
environment:
|
||||
POSTGRES_USER: root
|
||||
POSTGRES_PASSWORD: password
|
||||
POSTGRES_DB: bd2
|
||||
volumes:
|
||||
- ./postgres_data:/var/lib/postgresql/data
|
Loading…
Reference in New Issue