This commit is contained in:
r0mchik 2025-06-03 18:00:47 +07:00
parent 1814b59855
commit b2dabba384
5 changed files with 217 additions and 0 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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: