124 lines
2.7 KiB
YAML
124 lines
2.7 KiB
YAML
services:
|
|
nginx:
|
|
image: nginx:alpine
|
|
container_name: o2sound_nginx
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-file: 5
|
|
max-size: 100m
|
|
restart: always
|
|
network_mode: "host"
|
|
volumes:
|
|
- ./nginx/conf.d:/etc/nginx/conf.d:ro
|
|
depends_on:
|
|
- sound_fe
|
|
- sound_be
|
|
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: o2sound_redis
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-file: 5
|
|
max-size: 100m
|
|
restart: always
|
|
network_mode: "host"
|
|
volumes:
|
|
- ./redis/data:/data
|
|
- ./redis/redis.conf:/usr/local/etc/redis/redis.conf
|
|
command: redis-server /usr/local/etc/redis/redis.conf
|
|
|
|
|
|
postgresql:
|
|
image: postgres:15-alpine
|
|
container_name: o2sound_postgresql
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-file: 5
|
|
max-size: 100m
|
|
restart: always
|
|
network_mode: "host"
|
|
environment:
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=aio2o0656)^%^
|
|
- POSTGRES_DB=o2sound_v2
|
|
volumes:
|
|
- ./postgresql/data:/var/lib/postgresql/data
|
|
- ./postgresql/init:/docker-entrypoint-initdb.d
|
|
|
|
sound_fe:
|
|
build:
|
|
context: ./frontend
|
|
args:
|
|
- VITE_API_BASE_URL=sound_be
|
|
container_name: o2sound_sound_fe
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-file: 5
|
|
max-size: 100m
|
|
ports:
|
|
- "12200:3300"
|
|
environment:
|
|
- NODE_ENV=local
|
|
- NEXTAUTH_URL=sound_be
|
|
command: ["sh", "-c", "npm run build:skip-tsc && npm run preview:host"]
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- redis
|
|
- postgresql
|
|
- sound_be
|
|
|
|
|
|
sound_be:
|
|
build: ./backend
|
|
container_name: o2sound_sound_be
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-file: 5
|
|
max-size: 100m
|
|
restart: always
|
|
network_mode: "host"
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
volumes:
|
|
- ./backend/uploads:/app/uploads
|
|
- ./backend/crawling_results:/app/crawling_results
|
|
- ./backend/success_log:/app/success_log
|
|
- ./backend/ai:/app/ai:consistent
|
|
depends_on:
|
|
- redis
|
|
- postgresql
|
|
|
|
|
|
celery_worker:
|
|
build: ./backend
|
|
container_name: o2sound_celery_worker
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-file: 5
|
|
max-size: 100m
|
|
working_dir: /app
|
|
command: ["sh", "-c", "./run-celery.sh"]
|
|
restart: always
|
|
network_mode: "host"
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
volumes:
|
|
- ./backend/uploads:/app/uploads
|
|
- ./backend/crawling_results:/app/crawling_results
|
|
- ./backend/success_log:/app/success_log
|
|
- ./backend/ai:/app/ai:consistent
|
|
depends_on:
|
|
- redis
|
|
- postgresql
|
|
- sound_be
|
|
|
|
|