diff --git a/docker-compose.yaml b/docker-compose.yaml index 04a6140..e4721bf 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,6 +1,9 @@ services: web: build: ./web + command: > + sh -c "python manage.py collectstatic --noinput && + daphne -b 0.0.0.0 -p 8106 app.asgi:application" volumes: - .:/app - ./media:/app/media diff --git a/web/Dockerfile b/web/Dockerfile index eedb5fc..350579d 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -19,8 +19,5 @@ WORKDIR /app/web COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt -RUN python manage.py collectstatic --noinput COPY . . -COPY models ./models - -CMD ["daphne", "-b", "0.0.0.0", "-p", "8106", "app.asgi:application"] \ No newline at end of file +COPY models ./models \ No newline at end of file