new ipfs config
This commit is contained in:
parent
81a7612308
commit
0a04290235
|
|
@ -0,0 +1,259 @@
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: postgres:16
|
||||||
|
environment:
|
||||||
|
POSTGRES_DB: ${POSTGRES_DB}
|
||||||
|
POSTGRES_USER: ${POSTGRES_USER}
|
||||||
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||||
|
volumes:
|
||||||
|
- ${DB_DATA_DIR_HOST:-./postgres-data}:/var/lib/postgresql/data
|
||||||
|
ports:
|
||||||
|
- "${POSTGRES_FORWARD_PORT:-15380}:5432"
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 10
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
backend-app:
|
||||||
|
build:
|
||||||
|
context: ./uploader-bot
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
command: python -m app
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
environment:
|
||||||
|
- NODE_ROLE=primary
|
||||||
|
depends_on:
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
|
ipfs:
|
||||||
|
condition: service_started
|
||||||
|
volumes:
|
||||||
|
- ${BACKEND_LOGS_DIR_HOST:-./app-logs}:/app/logs
|
||||||
|
- ${BACKEND_DATA_DIR_HOST:-./dynamicStorage}:/app/data
|
||||||
|
ports:
|
||||||
|
- "${BACKEND_HTTP_PORT:-8080}:${SANIC_PORT:-8080}"
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "curl -fsS http://127.0.0.1:$${SANIC_PORT}/api/system.version >/dev/null || exit 1"]
|
||||||
|
interval: 15s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
restart: unless-stopped
|
||||||
|
networks: [mynet]
|
||||||
|
|
||||||
|
ipfs:
|
||||||
|
image: ipfs/kubo:latest
|
||||||
|
container_name: ipfs
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
IPFS_PROFILE: server
|
||||||
|
GOMAXPROCS: "4"
|
||||||
|
GOMEMLIMIT: "7500MiB"
|
||||||
|
volumes:
|
||||||
|
- ${IPFS_DATA_DIR_HOST:-./data/ipfs}:/data/ipfs
|
||||||
|
- ./configs/ipfs/init/001-config.sh:/container-init.d/001-config.sh:ro
|
||||||
|
# Опционально: приватный swarm.key. Смонтируйте файл, если он есть.
|
||||||
|
- ${IPFS_SWARM_KEY_FILE:-./configs/ipfs/swarm.key}:/data/ipfs/swarm.key:ro
|
||||||
|
ports:
|
||||||
|
- "4001:4001/tcp"
|
||||||
|
- "4001:4001/udp"
|
||||||
|
- "${IPFS_GATEWAY_BIND:-127.0.0.1}:8080:8080"
|
||||||
|
networks: [mynet]
|
||||||
|
sysctls:
|
||||||
|
net.core.rmem_max: "2500000"
|
||||||
|
net.core.wmem_max: "2500000"
|
||||||
|
ulimits:
|
||||||
|
nofile: { soft: 65536, hard: 65536 }
|
||||||
|
|
||||||
|
tusd:
|
||||||
|
image: tusproject/tusd:v1.12.0
|
||||||
|
container_name: tusd
|
||||||
|
restart: unless-stopped
|
||||||
|
command:
|
||||||
|
- -host=0.0.0.0
|
||||||
|
- -port=1080
|
||||||
|
- -upload-dir=/data
|
||||||
|
- -hooks-http=http://backend-app:${SANIC_PORT:-8080}/api/v1/upload.tus-hook
|
||||||
|
- -hooks-http-forward-headers=Authorization,X-Upload-Metadata
|
||||||
|
- -behind-proxy
|
||||||
|
environment:
|
||||||
|
- TUSD_LOG_LEVEL=info
|
||||||
|
volumes:
|
||||||
|
- ${TUSD_DATA_DIR_HOST:-./data/tusd}:/data
|
||||||
|
depends_on:
|
||||||
|
backend-app:
|
||||||
|
condition: service_started
|
||||||
|
networks: [mynet]
|
||||||
|
|
||||||
|
backend-indexer:
|
||||||
|
build:
|
||||||
|
context: ./uploader-bot
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
command: python -m app indexer
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
environment:
|
||||||
|
- NODE_ROLE=worker
|
||||||
|
depends_on:
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
|
backend-app:
|
||||||
|
condition: service_healthy
|
||||||
|
ipfs:
|
||||||
|
condition: service_started
|
||||||
|
volumes:
|
||||||
|
- ${BACKEND_LOGS_DIR_HOST:-./app-logs}:/app/logs
|
||||||
|
- ${BACKEND_DATA_DIR_HOST:-./dynamicStorage}:/app/data
|
||||||
|
restart: unless-stopped
|
||||||
|
networks: [mynet]
|
||||||
|
|
||||||
|
backend-ton-daemon:
|
||||||
|
build:
|
||||||
|
context: ./uploader-bot
|
||||||
|
command: python -m app ton_daemon
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
environment:
|
||||||
|
- NODE_ROLE=worker
|
||||||
|
depends_on:
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
|
backend-app:
|
||||||
|
condition: service_healthy
|
||||||
|
ipfs:
|
||||||
|
condition: service_started
|
||||||
|
volumes:
|
||||||
|
- ${BACKEND_LOGS_DIR_HOST:-./app-logs}:/app/logs
|
||||||
|
- ${BACKEND_DATA_DIR_HOST:-./dynamicStorage}:/app/data
|
||||||
|
restart: unless-stopped
|
||||||
|
networks: [mynet]
|
||||||
|
|
||||||
|
backend-license-index:
|
||||||
|
build:
|
||||||
|
context: ./uploader-bot
|
||||||
|
command: python -m app license_index
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
environment:
|
||||||
|
- NODE_ROLE=worker
|
||||||
|
depends_on:
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
|
backend-app:
|
||||||
|
condition: service_healthy
|
||||||
|
ipfs:
|
||||||
|
condition: service_started
|
||||||
|
volumes:
|
||||||
|
- ${BACKEND_LOGS_DIR_HOST:-./app-logs}:/app/logs
|
||||||
|
- ${BACKEND_DATA_DIR_HOST:-./dynamicStorage}:/app/data
|
||||||
|
restart: unless-stopped
|
||||||
|
networks: [mynet]
|
||||||
|
|
||||||
|
backend-convert-process:
|
||||||
|
build:
|
||||||
|
context: ./uploader-bot
|
||||||
|
command: python -m app convert_process
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
environment:
|
||||||
|
- NODE_ROLE=worker
|
||||||
|
depends_on:
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
|
backend-app:
|
||||||
|
condition: service_healthy
|
||||||
|
ipfs:
|
||||||
|
condition: service_started
|
||||||
|
volumes:
|
||||||
|
- ${BACKEND_LOGS_DIR_HOST:-./app-logs}:/app/logs
|
||||||
|
- ${BACKEND_DATA_DIR_HOST:-./dynamicStorage}:/app/data
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock # required by conversion pipeline
|
||||||
|
restart: unless-stopped
|
||||||
|
networks: [mynet]
|
||||||
|
|
||||||
|
backend-convert-v3:
|
||||||
|
build:
|
||||||
|
context: ./uploader-bot
|
||||||
|
command: python -m app convert_v3
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
environment:
|
||||||
|
- NODE_ROLE=worker
|
||||||
|
depends_on:
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
|
backend-app:
|
||||||
|
condition: service_healthy
|
||||||
|
ipfs:
|
||||||
|
condition: service_started
|
||||||
|
volumes:
|
||||||
|
- ${BACKEND_LOGS_DIR_HOST:-./app-logs}:/app/logs
|
||||||
|
- ${BACKEND_DATA_DIR_HOST:-./dynamicStorage}:/app/data
|
||||||
|
- ${TUSD_DATA_DIR_HOST:-./data/tusd}:/data
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
restart: unless-stopped
|
||||||
|
networks: [mynet]
|
||||||
|
|
||||||
|
backend-index-scout-v3:
|
||||||
|
build:
|
||||||
|
context: ./uploader-bot
|
||||||
|
command: python -m app index_scout_v3
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
environment:
|
||||||
|
- NODE_ROLE=worker
|
||||||
|
depends_on:
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
|
backend-app:
|
||||||
|
condition: service_healthy
|
||||||
|
ipfs:
|
||||||
|
condition: service_started
|
||||||
|
networks: [mynet]
|
||||||
|
|
||||||
|
backend-derivative-janitor:
|
||||||
|
build:
|
||||||
|
context: ./uploader-bot
|
||||||
|
command: python -m app derivative_janitor
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
environment:
|
||||||
|
- NODE_ROLE=worker
|
||||||
|
depends_on:
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
|
backend-app:
|
||||||
|
condition: service_healthy
|
||||||
|
ipfs:
|
||||||
|
condition: service_started
|
||||||
|
networks: [mynet]
|
||||||
|
|
||||||
|
frontend:
|
||||||
|
build:
|
||||||
|
context: ./web2-client
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
args:
|
||||||
|
VITE_SENTRY_DSN: ${VITE_SENTRY_DSN}
|
||||||
|
VITE_API_BASE_URL: ${VITE_API_BASE_URL}
|
||||||
|
VITE_API_BASE_STORAGE_URL: ${VITE_API_BASE_STORAGE_URL}
|
||||||
|
VITE_TUS_ENDPOINT: ${VITE_TUS_ENDPOINT}
|
||||||
|
depends_on:
|
||||||
|
backend-app:
|
||||||
|
condition: service_started
|
||||||
|
ports:
|
||||||
|
- "${FRONTEND_HTTP_PORT:-8081}:80"
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "curl -fsS http://127.0.0.1/ >/dev/null || exit 1"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
restart: unless-stopped
|
||||||
|
networks: [mynet]
|
||||||
|
|
||||||
|
volumes: {}
|
||||||
|
|
||||||
|
networks:
|
||||||
|
mynet:
|
||||||
|
driver: bridge
|
||||||
Loading…
Reference in New Issue