Add entrypoint script to create .env from Docker environment variables

This commit is contained in:
2025-12-17 12:50:01 +01:00
parent 9ab6347eb5
commit 0d1332b8bf
2 changed files with 38 additions and 0 deletions

View File

@@ -23,6 +23,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& curl -o /usr/local/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
&& chmod +x /usr/local/bin/wp
# Copy entrypoint script
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
# Copy application
USER www-data
WORKDIR /var/www/html
@@ -36,3 +40,6 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD curl -fsS http://localhost/ -o /dev/null || exit 1
EXPOSE 80
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["/init"]