Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/add new notification dev container #318

Merged
merged 3 commits into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions apps/data_handler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,26 @@ Go to bash
```bash
docker-compose exec backend bash
```

## How to run migration command:
1. Go to root folder `derisk-research`
2. Run up db in docker:
```
docker-compose -f devops/dev/docker-compose.db.yaml up -d --remove-orphans
```
3. Go to `data_hander` folder:
```
cd apps/data_handler
```
4. Install all dependencies:
```
poetry install
```
5. Go back to apps folder:
```
cd ..
```
5. Run migration command:
```
alembic -c data_handler/alembic.ini revision --autogenerate -m "your migration message here"
```
1 change: 1 addition & 0 deletions apps/data_handler/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.1.0"
description = ""
authors = ["Oleh Kostashchuk <[email protected]>"]
readme = "README.md"
package-mode = false

[tool.poetry.dependencies]
python = ">=3.11,<3.13"
Expand Down
23 changes: 23 additions & 0 deletions devops/dev/docker-compose.db.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: '3.8'

services:
db:
image: postgres:16
container_name: postgres_dev
environment:
POSTGRES_DB: data_handler
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
volumes:
- postgres_data:/var/lib/postgresql/data
- ../../apps/data_handler/init-db:/docker-entrypoint-initdb.d
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5

volumes:
postgres_data:
Loading