Skip to content

Commit f868d2b

Browse files
authored
🔥 Implement prestart.sh in parent image PR #134 from tiangolo/parent-prestart
Implement prestart.sh in parent image
2 parents 2adde9f + 87a351f commit f868d2b

File tree

21 files changed

+24
-200
lines changed

21 files changed

+24
-200
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,10 @@ You will see your Flask debugging server start, you will see how it sends respon
853853

854854
## What's new
855855

856+
2019-05-10:
857+
858+
* Move `/start.sh` and `/app/prestart.sh` functionality to parent image. [PR #134](https://github.com/tiangolo/uwsgi-nginx-flask-docker/pull/134).
859+
856860
2019-02-02:
857861

858862
* The Nginx configurations are generated dynamically from the entrypoint, instead of modifying pre-existing files. [PR #50 in the parent image `uwsgi-nginx`](https://github.com/tiangolo/uwsgi-nginx-docker/pull/50) and [PR #121](https://github.com/tiangolo/uwsgi-nginx-flask-docker/pull/121).

python2.7-alpine3.7/Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ WORKDIR /app
2121
# Make /app/* available to be imported by Python globally to better support several use cases like Alembic migrations.
2222
ENV PYTHONPATH=/app
2323

24-
# Copy start.sh script that will check for a /app/prestart.sh script and run it before starting the app
25-
COPY start.sh /start.sh
26-
RUN chmod +x /start.sh
27-
2824
# Move the base entrypoint to reuse it
2925
RUN mv /entrypoint.sh /uwsgi-nginx-entrypoint.sh
3026
# Copy the entrypoint that will generate Nginx additional configs
@@ -33,6 +29,7 @@ RUN chmod +x /entrypoint.sh
3329

3430
ENTRYPOINT ["/entrypoint.sh"]
3531

36-
# Run the start script, it will check for an /app/prestart.sh script (e.g. for migrations)
32+
# Run the start script provided by the parent image tiangolo/uwsgi-nginx.
33+
# It will check for an /app/prestart.sh script (e.g. for migrations)
3734
# And then will start Supervisor, which in turn will start Nginx and uWSGI
3835
CMD ["/start.sh"]

python2.7-alpine3.7/start.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

python2.7-alpine3.8/Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ WORKDIR /app
2121
# Make /app/* available to be imported by Python globally to better support several use cases like Alembic migrations.
2222
ENV PYTHONPATH=/app
2323

24-
# Copy start.sh script that will check for a /app/prestart.sh script and run it before starting the app
25-
COPY start.sh /start.sh
26-
RUN chmod +x /start.sh
27-
2824
# Move the base entrypoint to reuse it
2925
RUN mv /entrypoint.sh /uwsgi-nginx-entrypoint.sh
3026
# Copy the entrypoint that will generate Nginx additional configs
@@ -33,6 +29,7 @@ RUN chmod +x /entrypoint.sh
3329

3430
ENTRYPOINT ["/entrypoint.sh"]
3531

36-
# Run the start script, it will check for an /app/prestart.sh script (e.g. for migrations)
32+
# Run the start script provided by the parent image tiangolo/uwsgi-nginx.
33+
# It will check for an /app/prestart.sh script (e.g. for migrations)
3734
# And then will start Supervisor, which in turn will start Nginx and uWSGI
3835
CMD ["/start.sh"]

python2.7-alpine3.8/start.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

python2.7/Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ WORKDIR /app
2121
# Make /app/* available to be imported by Python globally to better support several use cases like Alembic migrations.
2222
ENV PYTHONPATH=/app
2323

24-
# Copy start.sh script that will check for a /app/prestart.sh script and run it before starting the app
25-
COPY start.sh /start.sh
26-
RUN chmod +x /start.sh
27-
2824
# Move the base entrypoint to reuse it
2925
RUN mv /entrypoint.sh /uwsgi-nginx-entrypoint.sh
3026
# Copy the entrypoint that will generate Nginx additional configs
@@ -33,6 +29,7 @@ RUN chmod +x /entrypoint.sh
3329

3430
ENTRYPOINT ["/entrypoint.sh"]
3531

36-
# Run the start script, it will check for an /app/prestart.sh script (e.g. for migrations)
32+
# Run the start script provided by the parent image tiangolo/uwsgi-nginx.
33+
# It will check for an /app/prestart.sh script (e.g. for migrations)
3734
# And then will start Supervisor, which in turn will start Nginx and uWSGI
3835
CMD ["/start.sh"]

python2.7/start.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

python3.5/Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ WORKDIR /app
2121
# Make /app/* available to be imported by Python globally to better support several use cases like Alembic migrations.
2222
ENV PYTHONPATH=/app
2323

24-
# Copy start.sh script that will check for a /app/prestart.sh script and run it before starting the app
25-
COPY start.sh /start.sh
26-
RUN chmod +x /start.sh
27-
2824
# Move the base entrypoint to reuse it
2925
RUN mv /entrypoint.sh /uwsgi-nginx-entrypoint.sh
3026
# Copy the entrypoint that will generate Nginx additional configs
@@ -33,6 +29,7 @@ RUN chmod +x /entrypoint.sh
3329

3430
ENTRYPOINT ["/entrypoint.sh"]
3531

36-
# Run the start script, it will check for an /app/prestart.sh script (e.g. for migrations)
32+
# Run the start script provided by the parent image tiangolo/uwsgi-nginx.
33+
# It will check for an /app/prestart.sh script (e.g. for migrations)
3734
# And then will start Supervisor, which in turn will start Nginx and uWSGI
3835
CMD ["/start.sh"]

python3.5/start.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

python3.6-alpine3.7/Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ WORKDIR /app
2121
# Make /app/* available to be imported by Python globally to better support several use cases like Alembic migrations.
2222
ENV PYTHONPATH=/app
2323

24-
# Copy start.sh script that will check for a /app/prestart.sh script and run it before starting the app
25-
COPY start.sh /start.sh
26-
RUN chmod +x /start.sh
27-
2824
# Move the base entrypoint to reuse it
2925
RUN mv /entrypoint.sh /uwsgi-nginx-entrypoint.sh
3026
# Copy the entrypoint that will generate Nginx additional configs
@@ -33,6 +29,7 @@ RUN chmod +x /entrypoint.sh
3329

3430
ENTRYPOINT ["/entrypoint.sh"]
3531

36-
# Run the start script, it will check for an /app/prestart.sh script (e.g. for migrations)
32+
# Run the start script provided by the parent image tiangolo/uwsgi-nginx.
33+
# It will check for an /app/prestart.sh script (e.g. for migrations)
3734
# And then will start Supervisor, which in turn will start Nginx and uWSGI
3835
CMD ["/start.sh"]

0 commit comments

Comments
 (0)