From b2dabba384249c67fcb4d8de300b1f7e51085588 Mon Sep 17 00:00:00 2001 From: r0mchik Date: Tue, 3 Jun 2025 18:00:47 +0700 Subject: [PATCH] v0.0.5 --- docker-composes/docker-compose-dev.yaml | 36 +++++++++++++ .../docker-compose-gpu-cuda126-dev.yaml | 40 +++++++++++++++ .../docker-compose-gpu-cuda128-dev.yaml | 40 +++++++++++++++ docker-composes/docker-compose.yaml | 50 ++++++++++++++++++ docker-composes/docker-compose.yaml.save | 51 +++++++++++++++++++ 5 files changed, 217 insertions(+) create mode 100644 docker-composes/docker-compose-dev.yaml create mode 100644 docker-composes/docker-compose-gpu-cuda126-dev.yaml create mode 100644 docker-composes/docker-compose-gpu-cuda128-dev.yaml create mode 100644 docker-composes/docker-compose.yaml create mode 100644 docker-composes/docker-compose.yaml.save diff --git a/docker-composes/docker-compose-dev.yaml b/docker-composes/docker-compose-dev.yaml new file mode 100644 index 0000000..9499458 --- /dev/null +++ b/docker-composes/docker-compose-dev.yaml @@ -0,0 +1,36 @@ +services: + web: + build: + context: ../web + dockerfile: Dockerfiles/Dockerfile-dev + container_name: liquid-web-dev + command: > + sh -c "python manage.py collectstatic --noinput && + daphne -b 0.0.0.0 -p 8000 app.asgi:application" + volumes: + - ..:/app + - ../web/media:/app/media + - ../web/staticfiles:/app/web/staticfiles + + ports: + - "8000:8000" + + depends_on: + - redis + # - vpn + redis: + image: redis:alpine + container_name: liquid-redis-dev + + volumes: + - redis_data:/data + ports: + - "6378:6378" + healthcheck: + test: [ "CMD-SHELL", "redis-cli ping | grep PONG" ] + interval: 1s + timeout: 3s + retries: 5 + +volumes: + redis_data: \ No newline at end of file diff --git a/docker-composes/docker-compose-gpu-cuda126-dev.yaml b/docker-composes/docker-compose-gpu-cuda126-dev.yaml new file mode 100644 index 0000000..6ba3185 --- /dev/null +++ b/docker-composes/docker-compose-gpu-cuda126-dev.yaml @@ -0,0 +1,40 @@ +version: '3.9' + +services: + web: + build: + context: ../web + dockerfile: Dockerfiles/Dockerfile-gpu-cuda126-dev + container_name: liquid-web-gpu-cuda126-dev + command: > + sh -c "python manage.py collectstatic --noinput && + daphne -b 0.0.0.0 -p 8000 app.asgi:application" + volumes: + - ..:/app + - ../web/media:/app/media + - ../web/staticfiles:/app/web/staticfiles + ports: + - "8000:8000" + depends_on: + - redis + deploy: + resources: + reservations: + devices: + - capabilities: [gpu] + + redis: + image: redis:alpine + container_name: liquid-redis-gpu-cuda126-dev + volumes: + - redis_data:/data + ports: + - "6378:6378" + healthcheck: + test: ["CMD-SHELL", "redis-cli ping | grep PONG"] + interval: 1s + timeout: 3s + retries: 5 + +volumes: + redis_data: \ No newline at end of file diff --git a/docker-composes/docker-compose-gpu-cuda128-dev.yaml b/docker-composes/docker-compose-gpu-cuda128-dev.yaml new file mode 100644 index 0000000..45efe89 --- /dev/null +++ b/docker-composes/docker-compose-gpu-cuda128-dev.yaml @@ -0,0 +1,40 @@ +version: '3.9' + +services: + web: + build: + context: ../web + dockerfile: Dockerfiles/Dockerfile-gpu-cuda128-dev + container_name: liquid-web-gpu-cuda128-dev + command: > + sh -c "python manage.py collectstatic --noinput && + daphne -b 0.0.0.0 -p 8000 app.asgi:application" + volumes: + - ..:/app + - ../web/media:/app/media + - ../web/staticfiles:/app/web/staticfiles + ports: + - "8000:8000" + depends_on: + - redis + deploy: + resources: + reservations: + devices: + - capabilities: [gpu] + + redis: + image: redis:alpine + container_name: liquid-redis-gpu-cuda128-dev + volumes: + - redis_data:/data + ports: + - "6378:6378" + healthcheck: + test: ["CMD-SHELL", "redis-cli ping | grep PONG"] + interval: 1s + timeout: 3s + retries: 5 + +volumes: + redis_data: \ No newline at end of file diff --git a/docker-composes/docker-compose.yaml b/docker-composes/docker-compose.yaml new file mode 100644 index 0000000..3aede40 --- /dev/null +++ b/docker-composes/docker-compose.yaml @@ -0,0 +1,50 @@ +services: + web: + container_name: liquid_web + build: + context: ../web + dockerfile: Dockerfiles/Dockerfile + command: > + sh -c "python manage.py collectstatic --noinput && + daphne -b 0.0.0.0 -p 8106 app.asgi:application" + volumes: + - ..:/app + - ../web/media:/app/media + - ../web/staticfiles:/app/web/staticfiles + + ports: + - "8106:8106" + + depends_on: + - redis + + restart: always + + # nginx: + # build: ./nginx/dev + # # image: nginx:latest + # ports: + # - "80:80" + # volumes: + # # - ./nginx/nginx.conf:/etc/nginx/nginx.conf + # - ./nginx/nginx/conf.d/nginx.conf:/etc/nginx/conf.d/nginx.conf + # depends_on: + # - web + + # restart: always + + redis: + image: redis:alpine + volumes: + - redis_data:/data + ports: + - "6378:6378" + healthcheck: + test: [ "CMD-SHELL", "redis-cli ping | grep PONG" ] + interval: 1s + timeout: 3s + retries: 5 + restart: always + +volumes: + redis_data: \ No newline at end of file diff --git a/docker-composes/docker-compose.yaml.save b/docker-composes/docker-compose.yaml.save new file mode 100644 index 0000000..49a1c25 --- /dev/null +++ b/docker-composes/docker-compose.yaml.save @@ -0,0 +1,51 @@ +services: + web: + build: ./web + command: > + sh -c " + python manage.py collectstatic --noinput + daphne -b 0.0.0.0 -p 8000 app.asgi:application + " + volumes: + - .:/app + - ./media:/app/media + - ./static:/app/staticfiles + + ports: + - '8000:8000' + expose: + - 8000 + depends_on: + - redis + + restart: always + + nginx: + build: ./nginx + ports: + - "80:80" + volumes: + - ./static:/app/static + - ./nginx/nginx.conf:/etc/nginx/conf.d/nginx.conf + depends_on: + - web + + restart: always + + redis: + image: redis:alpine + volumes: + - redis_data:/data + ports: + - "6378:6378" + healthcheck: + test: [ "CMD-SHELL", "redis-cli ping | grep PONG" ] + interval: 1s + timeout: 3s + retries: 5 + + restart: always + +volumes: + redis_data: +