Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 4 additions & 42 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -39,51 +29,32 @@ 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
volumes:
- ./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:
Expand All @@ -99,8 +70,6 @@ services:
- rabbitmq
volumes:
- ./backend:/backend
# networks:
# - gd
command: "celery -A config.celery worker --loglevel=info --pool=solo"

nginx:
Expand All @@ -116,13 +85,6 @@ services:
depends_on:
- backend
- frontend
# # 가상 네트워크 연결
# networks:
# - gd

# networks:
# gd:
# driver: bridge

volumes:
static_volume: null
Expand Down