feat: add dev and prod deployment scaffolding
This commit is contained in:
@@ -15,5 +15,5 @@ COPY requirements.txt /tmp/requirements.txt
|
||||
RUN pip install --no-cache-dir -r /tmp/requirements.txt
|
||||
|
||||
COPY . /app
|
||||
RUN chmod +x /app/entrypoint-web.sh /app/entrypoint-worker.sh
|
||||
RUN chmod +x /app/entrypoint-web.sh /app/entrypoint-worker.sh /app/entrypoint-web-prod.sh /app/entrypoint-worker-prod.sh
|
||||
RUN chown -R app:app /app
|
||||
|
||||
9
backend/entrypoint-web-prod.sh
Executable file
9
backend/entrypoint-web-prod.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
exec gunicorn config.wsgi:application \
|
||||
--bind 0.0.0.0:8000 \
|
||||
--workers 3 \
|
||||
--timeout 120 \
|
||||
--access-logfile - \
|
||||
--error-logfile -
|
||||
4
backend/entrypoint-worker-prod.sh
Executable file
4
backend/entrypoint-worker-prod.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
exec celery -A config worker -l info
|
||||
Reference in New Issue
Block a user