mirror of
https://github.com/aykhans/portfolio-blog.git
synced 2025-12-14 01:29:19 +00:00
Added dev and prod docker compose files
This commit is contained in:
@@ -1,56 +0,0 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres
|
||||
ports:
|
||||
- 5432:5432
|
||||
volumes:
|
||||
- dbdata:/var/lib/postgresql/data
|
||||
env_file:
|
||||
- ./config/postgres/postgres.env
|
||||
|
||||
mongodb:
|
||||
image: mongo:latest
|
||||
env_file:
|
||||
- ./config/mongodb/mongodb.env
|
||||
ports:
|
||||
- 27017:27017
|
||||
volumes:
|
||||
- mongodb_data:/data/db
|
||||
|
||||
app:
|
||||
build: ./src/
|
||||
env_file:
|
||||
- ./config/postgres/postgres.env
|
||||
- ./config/mongodb/mongodb.env
|
||||
- ./config/app/app.env
|
||||
ports:
|
||||
- 8000:8000
|
||||
depends_on:
|
||||
- db
|
||||
- mongodb
|
||||
volumes:
|
||||
- ./src/app:/src/app
|
||||
- static:/src/static
|
||||
- media:/src/media
|
||||
command: >
|
||||
bash -c "poetry run alembic upgrade head
|
||||
&& poetry run uvicorn --reload --host=0.0.0.0 --port=8000 app.main:app"
|
||||
|
||||
nginx:
|
||||
image: nginx
|
||||
ports:
|
||||
- 80:80
|
||||
volumes:
|
||||
- ./config/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
|
||||
- static:/static
|
||||
- media:/media
|
||||
depends_on:
|
||||
- app
|
||||
|
||||
volumes:
|
||||
dbdata:
|
||||
static:
|
||||
media:
|
||||
mongodb_data:
|
||||
Reference in New Issue
Block a user