Remove .sh ext from executable scripts

This commit is contained in:
Nikita P. Shupeyko 2018-05-14 10:28:50 +03:00
parent 90953a83f2
commit 849f64e1a5
11 changed files with 34 additions and 63 deletions

View File

@ -19,22 +19,22 @@ RUN apk update \
COPY ./requirements /requirements
RUN pip install -r /requirements/local.txt
COPY ./compose/production/django/entrypoint.sh /entrypoint.sh
RUN sed -i 's/\r//' /entrypoint.sh
RUN chmod +x /entrypoint.sh
COPY ./compose/production/django/entrypoint /entrypoint
RUN sed -i 's/\r//' /entrypoint
RUN chmod +x /entrypoint
COPY ./compose/local/django/start.sh /start.sh
RUN sed -i 's/\r//' /start.sh
RUN chmod +x /start.sh
COPY ./compose/local/django/start /start
RUN sed -i 's/\r//' /start
RUN chmod +x /start
{% if cookiecutter.use_celery == "y" %}
COPY ./compose/local/django/celery/worker/start.sh /start-celeryworker.sh
RUN sed -i 's/\r//' /start-celeryworker.sh
RUN chmod +x /start-celeryworker.sh
COPY ./compose/local/django/celery/worker/start /start-celeryworker
RUN sed -i 's/\r//' /start-celeryworker
RUN chmod +x /start-celeryworker
COPY ./compose/local/django/celery/beat/start.sh /start-celerybeat.sh
RUN sed -i 's/\r//' /start-celerybeat.sh
RUN chmod +x /start-celerybeat.sh
COPY ./compose/local/django/celery/beat/start /start-celerybeat
RUN sed -i 's/\r//' /start-celerybeat
RUN chmod +x /start-celerybeat
{% endif %}
WORKDIR /app
ENTRYPOINT ["/entrypoint.sh"]
ENTRYPOINT ["/entrypoint"]

View File

@ -1,10 +0,0 @@
#!/bin/sh
set -o errexit
set -o pipefail
set -o nounset
set -o xtrace
rm -f './celerybeat.pid'
celery -A {{cookiecutter.project_slug}}.taskapp beat -l INFO

View File

@ -1,9 +0,0 @@
#!/bin/sh
set -o errexit
set -o pipefail
set -o nounset
set -o xtrace
celery -A {{cookiecutter.project_slug}}.taskapp worker -l INFO

View File

@ -1,10 +0,0 @@
#!/bin/sh
set -o errexit
set -o pipefail
set -o nounset
set -o xtrace
python manage.py migrate
python manage.py runserver_plus 0.0.0.0:8000

View File

@ -19,23 +19,23 @@ COPY ./requirements /requirements
RUN pip install --no-cache-dir -r /requirements/production.txt \
&& rm -rf /requirements
COPY ./compose/production/django/gunicorn.sh /gunicorn.sh
RUN sed -i 's/\r//' /gunicorn.sh
RUN chmod +x /gunicorn.sh
RUN chown django /gunicorn.sh
COPY ./compose/production/django/gunicorn /gunicorn
RUN sed -i 's/\r//' /gunicorn
RUN chmod +x /gunicorn
RUN chown django /gunicorn
COPY ./compose/production/django/entrypoint.sh /entrypoint.sh
RUN sed -i 's/\r//' /entrypoint.sh
RUN chmod +x /entrypoint.sh
RUN chown django /entrypoint.sh
COPY ./compose/production/django/entrypoint /entrypoint
RUN sed -i 's/\r//' /entrypoint
RUN chmod +x /entrypoint
RUN chown django /entrypoint
{% if cookiecutter.use_celery == "y" %}
COPY ./compose/production/django/celery/worker/start.sh /start-celeryworker.sh
RUN sed -i 's/\r//' /start-celeryworker.sh
RUN chmod +x /start-celeryworker.sh
COPY ./compose/production/django/celery/worker/start /start-celeryworker
RUN sed -i 's/\r//' /start-celeryworker
RUN chmod +x /start-celeryworker
COPY ./compose/production/django/celery/beat/start.sh /start-celerybeat.sh
RUN sed -i 's/\r//' /start-celerybeat.sh
RUN chmod +x /start-celerybeat.sh
COPY ./compose/production/django/celery/beat/start /start-celerybeat
RUN sed -i 's/\r//' /start-celerybeat
RUN chmod +x /start-celerybeat
{% endif %}
COPY . /app
@ -45,4 +45,4 @@ USER django
WORKDIR /app
ENTRYPOINT ["/entrypoint.sh"]
ENTRYPOINT ["/entrypoint"]

View File

@ -22,7 +22,7 @@ services:
- ./.envs/.local/.postgres
ports:
- "8000:8000"
command: /start.sh
command: /start
postgres:
build:
@ -60,7 +60,7 @@ services:
- ./.envs/.local/.django
- ./.envs/.local/.postgres
ports: []
command: /start-celeryworker.sh
command: /start-celeryworker
celerybeat:
<<: *django
@ -75,6 +75,6 @@ services:
- ./.envs/.local/.django
- ./.envs/.local/.postgres
ports: []
command: /start-celerybeat.sh
command: /start-celerybeat
{%- endif %}

View File

@ -17,7 +17,7 @@ services:
env_file:
- ./.envs/.production/.django
- ./.envs/.production/.postgres
command: /gunicorn.sh
command: /gunicorn
postgres:
build:
@ -58,7 +58,7 @@ services:
env_file:
- ./.envs/.production/.django
- ./.envs/.production/.postgres
command: /start-celeryworker.sh
command: /start-celeryworker
celerybeat:
<<: *django
@ -69,6 +69,6 @@ services:
env_file:
- ./.envs/.production/.django
- ./.envs/.production/.postgres
command: /start-celerybeat.sh
command: /start-celerybeat
{%- endif %}