Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
marevol committed Dec 7, 2024
1 parent 8ee51ef commit 7778544
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 19 deletions.
9 changes: 5 additions & 4 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
boto3>=1.4.4
celery==5.0.6
boto3==1.35.76
celery==5.1.2
Django==3.2
django-celery-results==2.0.1
django-cleanup==5.2.0
Expand All @@ -12,11 +12,12 @@ djangorestframework-simplejwt==4.7.0
dj-rest-auth==2.1.7
pyjwt==2.1.0
drf_spectacular==0.16.0
optuna==2.7.0
SQLAlchemy==1.4.54
optuna==2.10.1
pandas==1.3.5
irspack==0.1.16
numpy==1.19.5
scikit-learn==0.24.2
whitenoise==5.2.0
django-environ==0.4.5
psycopg2-binary==2.9.1
psycopg2-binary==2.9.10
32 changes: 27 additions & 5 deletions compose-dev.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
version: "3.7"
services:
queue:
image: bitnami/rabbitmq:3.9
image: rabbitmq:4.0
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
interval: "5s"
timeout: "3s"
retries: 5
start_period: "5s"
env_file:
- envs/dev.env
db:
image: postgres:12
volumes:
- db-data:/var/lib/postgresql/data/pgdata
healthcheck:
test: ["CMD", "pg_isready", "-U", "recotem_user", "-d", "recotem"]
interval: "5s"
timeout: "3s"
retries: 5
start_period: "5s"
env_file:
- envs/dev.env
backend:
depends_on:
- db
db:
condition: service_healthy
queue:
condition: service_healthy
build:
context: ./backend
dockerfile: backend.dockerfile
Expand All @@ -19,10 +35,16 @@ services:
volumes:
- ./backend/recotem:/app
- data-location:/app/data
env_file:
- envs/dev.env
ports:
- "8000:80"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:80/api/ping/ || exit 1"]
interval: "10s"
timeout: "5s"
retries: 2
start_period: "5s"
env_file:
- envs/dev.env
celery_worker:
depends_on:
- db
Expand Down
13 changes: 9 additions & 4 deletions compose-test.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
version: "3.7"
services:
queue:
image: bitnami/rabbitmq:3.9
ports:
- "5672:5672"
image: rabbitmq:4.0
env_file:
- envs/dev.env
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
interval: "5s"
timeout: "3s"
retries: 5
start_period: "5s"
backend:
depends_on:
- queue
Expand Down
25 changes: 20 additions & 5 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,32 @@
version: "3.7"
services:
queue:
image: bitnami/rabbitmq:3.9
image: rabbitmq:4.0
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
interval: "5s"
timeout: "3s"
retries: 5
start_period: "5s"
env_file:
- envs/production.env
db:
image: postgres:12
volumes:
- db-data:/var/lib/postgresql/data/pgdata
healthcheck:
test: ["CMD", "pg_isready", "-U", "recotem_user", "-d", "recotem"]
interval: "5s"
timeout: "3s"
retries: 5
start_period: "5s"
env_file:
- envs/production.env
backend:
depends_on:
- db
- queue
db:
condition: service_healthy
queue:
condition: service_healthy
build:
context: ./backend
dockerfile: backend.dockerfile
Expand Down Expand Up @@ -49,7 +64,7 @@ services:
proxy:
depends_on:
- frontend
image: nginx:1.21.1
image: nginx:1.27.3
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
- static-files:/app/dist/static
Expand Down
4 changes: 4 additions & 0 deletions envs/dev.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# rabbitmq
RABBITMQ_DEFAULT_USER=user
RABBITMQ_DEFAULT_PASS=bitnami

# celery
CELERY_BROKER_URL=amqp://user:bitnami@queue:5672

Expand Down
4 changes: 4 additions & 0 deletions envs/production.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# rabbitmq
RABBITMQ_DEFAULT_USER=user
RABBITMQ_DEFAULT_PASS=bitnami

# db settings
POSTGRES_USER=recotem_user
POSTGRES_PASSWORD=VeryBadPassword
Expand Down
2 changes: 1 addition & 1 deletion frontend/frontend.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ COPY ./ /app/

RUN yarn run build

FROM nginx:1.21.1
FROM nginx:1.27.3

COPY --from=build-stage /app/dist/ /usr/share/nginx/html
COPY --from=build-stage /app/nginx.conf /etc/nginx/conf.d/default.conf
Expand Down

0 comments on commit 7778544

Please sign in to comment.