From 391c769f95d1fd2acf7a705282e19f90dc591091 Mon Sep 17 00:00:00 2001 From: Heekyeong Park Date: Sat, 1 Jul 2023 19:37:16 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20rabbitmq+celery=20=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.prod.yml | 46 ++++------------------------------------- 1 file changed, 4 insertions(+), 42 deletions(-) diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 81e7da4..9db6f83 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -5,25 +5,15 @@ services: build: context: ./frontend dockerfile: dockerfile.prod - # command: ["yarn", "start"] container_name: frontend - # ports: - # - 3000:3000 volumes: - ./frontend:/frontend - build_folder:/frontend/build - ./frontend/node_modules/:/frontend/node_modules - # environment: - # - CI=true - # - CHOKIDAR_USEPOLLING=true # HMR을 위해 필요한 설정 - # - REACT_APP_BACKEND_URL=http://localhost:8000 - stdin_open: true # react-script 3.4.1 부터 필요 + stdin_open: true tty: true env_file: - ./frontend/.env.local - # 가상 네트워크 연결 - # networks: - # - gd backend: container_name: backend @@ -39,7 +29,6 @@ services: python3 manage.py migrate gdiary && python3 manage.py migrate text && gunicorn config.wsgi --bind 0.0.0.0:8000" - # decode.py, makemigrations, migrate 따로 해야함 restart: on-failure ports: - 8000:8000 @@ -47,43 +36,25 @@ services: - ./backend:/backend - static_volume:/backend/staticfiles - media_volume:/backend/mediafiles - # depends_on: - # - rabbitmq expose: - 8000 env_file: - ./backend/.env - # 가상 네트워크 연결 - # networks: - # - gd - - # mysql: - # image: mysql - # command: --lower_case_table_names=1 - # container_name: mysql # 컨테이너 이름 설정 - # ports: - # - "3307:3306" - # env_file: - # - ./backend/.env - # networks: - # - gd rabbitmq: - hostname: localhost container_name: rabbitmq image: rabbitmq:3-management command: rabbitmq-server restart: unless-stopped environment: - - RABBITMQ_USER=guest - - RABBITMQ_PASSWORD=guest + - RABBITMQ_DEFAULT_USER=${RABBITMQ_USER} + - RABBITMQ_DEFAULT_PASS=${RABBITMQ_PASSWORD} + - RABBITMQ_DEFAULT_VHOST=${RABBITMQ_VHOST} ports: - 5672:5672 # Default Port - 15672:15672 # For UI volumes: - ./backend:/backend - # networks: - # - gd depends_on: - backend expose: @@ -99,8 +70,6 @@ services: - rabbitmq volumes: - ./backend:/backend - # networks: - # - gd command: "celery -A config.celery worker --loglevel=info --pool=solo" nginx: @@ -116,13 +85,6 @@ services: depends_on: - backend - frontend - # # 가상 네트워크 연결 - # networks: - # - gd - -# networks: -# gd: -# driver: bridge volumes: static_volume: null