Skip to content

Commit 33eaeee

Browse files
bluebamusclaude
andcommitted
refactor(compose): 웹 스택 앱/celery command 를 poetry → uv sync 로 전환 (Phase 2)
4개 Python 스택(gunicorn/uvicorn/uwsgi/daphne)의 app·celery·celery-beat 서비스 command 에서 의존성 설치를 uv 로 전환. exec 타깃·conf 경로·celery 옵션 등 startup-web 고유 설정은 보존하고 설치 방식만 교체. - poetry config/install → uv sync --inexact --extra <runtime> --extra celery - 스택별 --extra: gunicorn/uvicorn/uwsgi/daphne (+celery 공통) - docker compose config 문법 검증 통과(5개 스택) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 2f71582 commit 33eaeee

4 files changed

Lines changed: 12 additions & 21 deletions

File tree

compose/web_service/nginx_daphne/docker-compose.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ services:
4040
- ../../../script/logrotate/daphne/daphne:/etc/logrotate.d/daphne
4141
command: |
4242
bash -c "
43-
poetry config virtualenvs.create false &&
44-
poetry install --no-root --without test &&
43+
uv sync --inexact --extra daphne --extra celery &&
4544
export PYTHONUNBUFFERED=1 &&
4645
exec daphne -p 8000 -b 0.0.0.0 \
4746
--websocket_timeout 60 \
@@ -84,8 +83,7 @@ services:
8483
- ../../../www:/www
8584
- ../../../log:/log
8685
- ../../../script/logrotate/daphne/celery/daphne-celery:/etc/logrotate.d/daphne-celery
87-
command: bash -c "poetry config virtualenvs.create false && \
88-
poetry install --no-root && \
86+
command: bash -c "uv sync --inexact --extra daphne --extra celery && \
8987
celery -A config worker \
9088
--loglevel=INFO \
9189
--logfile=/log/daphne/celery/worker-%n%I.log"
@@ -115,8 +113,7 @@ services:
115113
- ../../../www:/www
116114
- ../../../log:/log
117115
- ../../../script/logrotate/daphne/celerybeat/daphne-celerybeat:/etc/logrotate.d/daphne-celerybeat
118-
command: bash -c "poetry config virtualenvs.create false && \
119-
poetry install --no-root && \
116+
command: bash -c "uv sync --inexact --extra daphne --extra celery && \
120117
celery -A config beat \
121118
--loglevel=INFO \
122119
--scheduler django_celery_beat.schedulers:DatabaseScheduler \

compose/web_service/nginx_gunicorn/docker-compose.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ services:
3939
- ../../../log:/log
4040
- ../../../config/app-server/gunicorn/:/gunicorn
4141
- ../../../script/logrotate/gunicorn/gunicorn:/etc/logrotate.d/gunicorn
42-
command: bash -c "poetry config virtualenvs.create false && poetry install --no-root --without test && exec gunicorn -c /gunicorn/gunicorn.conf.py"
42+
command: bash -c "uv sync --inexact --extra gunicorn --extra celery && exec gunicorn -c /gunicorn/gunicorn.conf.py"
4343
# command: bash -c "uv pip install --system --no-cache . && exec gunicorn -c /gunicorn/gunicorn.conf.py"
4444
environment:
4545
TZ: "Asia/Seoul"
@@ -58,8 +58,7 @@ services:
5858
- ../../../www:/www
5959
- ../../../log:/log
6060
- ../../../script/logrotate/gunicorn/celery/gunicorn-celery:/etc/logrotate.d/gunicorn-celery
61-
command: bash -c "poetry config virtualenvs.create false && \
62-
poetry install --no-root && \
61+
command: bash -c "uv sync --inexact --extra gunicorn --extra celery && \
6362
celery -A config worker \
6463
--loglevel=INFO \
6564
--logfile=/log/gunicorn/celery/worker-%n%I.log "
@@ -89,8 +88,7 @@ services:
8988
- ../../../www:/www
9089
- ../../../log:/log
9190
- ../../../script/logrotate/gunicorn/celerybeat/gunicorn-celerybeat:/etc/logrotate.d/gunicorn-celerybeat
92-
command: bash -c "poetry config virtualenvs.create false && \
93-
poetry install --no-root && \
91+
command: bash -c "uv sync --inexact --extra gunicorn --extra celery && \
9492
celery -A config beat \
9593
--loglevel=INFO \
9694
--scheduler django_celery_beat.schedulers:DatabaseScheduler \

compose/web_service/nginx_uvicorn/docker-compose.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ services:
3939
- ../../../log:/log
4040
- ../../../config/app-server/uvicorn/:/uvicorn
4141
- ../../../script/logrotate/uvicorn/uvicorn:/etc/logrotate.d/uvicorn
42-
command: bash -c "poetry config virtualenvs.create false && poetry install --no-root --without test && exec gunicorn -c /uvicorn/gunicorn_uvicorn.conf.py"
42+
command: bash -c "uv sync --inexact --extra uvicorn --extra celery && exec gunicorn -c /uvicorn/gunicorn_uvicorn.conf.py"
4343
# command: bash -c "uv pip install --system --no-cache . && exec gunicorn -c /uvicorn/gunicorn_uvicorn.conf.py"
4444
environment:
4545
TZ: "Asia/Seoul"
@@ -58,8 +58,7 @@ services:
5858
- ../../../www:/www
5959
- ../../../log:/log
6060
- ../../../script/logrotate/uvicorn/celery/uvicorn-celery:/etc/logrotate.d/uvicorn-celery
61-
command: bash -c "poetry config virtualenvs.create false && \
62-
poetry install --no-root && \
61+
command: bash -c "uv sync --inexact --extra uvicorn --extra celery && \
6362
exec celery -A config worker \
6463
--loglevel=INFO \
6564
--logfile=/log/uvicorn/celery/worker-%n%I.log "
@@ -89,8 +88,7 @@ services:
8988
- ../../../www:/www
9089
- ../../../log:/log
9190
- ../../../script/logrotate/uvicorn/celerybeat/uvicorn-celerybeat:/etc/logrotate.d/uvicorn-celerybeat
92-
command: bash -c "poetry config virtualenvs.create false && \
93-
poetry install --no-root && \
91+
command: bash -c "uv sync --inexact --extra uvicorn --extra celery && \
9492
exec celery -A config beat \
9593
--loglevel=INFO \
9694
--scheduler django_celery_beat.schedulers:DatabaseScheduler \

compose/web_service/nginx_uwsgi/docker-compose.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ services:
3939
- ../../../config/app-server/uwsgi/uwsgi.ini:/application/uwsgi.ini
4040
- ../../../log:/log
4141
- ../../../script/logrotate/uwsgi/uwsgi:/etc/logrotate.d/uwsgi
42-
command: bash -c "poetry config virtualenvs.create false && poetry install --no-root --without test && exec uwsgi --ini /application/uwsgi.ini"
42+
command: bash -c "uv sync --inexact --extra uwsgi --extra celery && exec uwsgi --ini /application/uwsgi.ini"
4343
# command: bash -c "uv pip install --system --no-cache . && exec uwsgi --ini /application/uwsgi.ini"
4444
environment:
4545
TZ: "Asia/Seoul"
@@ -58,8 +58,7 @@ services:
5858
- ../../../www:/www
5959
- ../../../log:/log
6060
- ../../../script/logrotate/uwsgi/celery/uwsgi-celery:/etc/logrotate.d/uwsgi-celery
61-
command: bash -c "poetry config virtualenvs.create false && \
62-
poetry install --no-root && \
61+
command: bash -c "uv sync --inexact --extra uwsgi --extra celery && \
6362
exec celery -A config worker \
6463
--loglevel=INFO \
6564
--logfile=/log/uwsgi/celery/worker-%n%I.log"
@@ -89,8 +88,7 @@ services:
8988
- ../../../www:/www
9089
- ../../../log:/log
9190
- ../../../script/logrotate/uwsgi/celerybeat/uwsgi-celerybeat:/etc/logrotate.d/uwsgi-celerybeat
92-
command: bash -c "poetry config virtualenvs.create false && \
93-
poetry install --no-root && \
91+
command: bash -c "uv sync --inexact --extra uwsgi --extra celery && \
9492
celery -A config beat \
9593
--loglevel=INFO \
9694
--scheduler django_celery_beat.schedulers:DatabaseScheduler \

0 commit comments

Comments
 (0)