You've already forked Php-Template
fix: optimize Dockerfile by removing unnecessary build dependencies and improving healthcheck
All checks were successful
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Successful in 1m43s
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 1m37s
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 1m48s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Successful in 1m42s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Successful in 1m43s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Successful in 1m19s
🏗️✨ Build Workflow / 🖥️ 🔨 Build (push) Successful in 19m58s
🏗️✨ Build Workflow / 🖥️ 🔨 Build Migrations (push) Successful in 1m53s
All checks were successful
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Successful in 1m43s
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 1m37s
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 1m48s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Successful in 1m42s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Successful in 1m43s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Successful in 1m19s
🏗️✨ Build Workflow / 🖥️ 🔨 Build (push) Successful in 19m58s
🏗️✨ Build Workflow / 🖥️ 🔨 Build Migrations (push) Successful in 1m53s
This commit is contained in:
17
Dockerfile
17
Dockerfile
@@ -26,6 +26,7 @@ RUN if [ "$KAFKA_ENABLED" -eq 1 ] ; then \
|
|||||||
echo "Kafka support enabled" ; \
|
echo "Kafka support enabled" ; \
|
||||||
apk add autoconf g++ librdkafka-dev make --no-cache ; \
|
apk add autoconf g++ librdkafka-dev make --no-cache ; \
|
||||||
pecl install rdkafka && docker-php-ext-enable rdkafka ; \
|
pecl install rdkafka && docker-php-ext-enable rdkafka ; \
|
||||||
|
apk del autoconf g++ make ; \
|
||||||
else \
|
else \
|
||||||
echo "Kafka support disabled" ; \
|
echo "Kafka support disabled" ; \
|
||||||
exit 0 ; \
|
exit 0 ; \
|
||||||
@@ -44,12 +45,16 @@ COPY --from=library /app/vendor /app/vendor
|
|||||||
ADD src src/
|
ADD src src/
|
||||||
ADD generated generated/
|
ADD generated generated/
|
||||||
ADD protos protos/
|
ADD protos protos/
|
||||||
ADD server.php .
|
ADD server.php cli.php grpc-worker.php .rr.yaml config.php ./
|
||||||
ADD .rr.yaml .
|
|
||||||
ADD config.php .
|
|
||||||
|
|
||||||
EXPOSE 9501
|
EXPOSE 9501 9001
|
||||||
EXPOSE 9001
|
|
||||||
|
RUN addgroup -g 1000 appuser && adduser -D -u 1000 -G appuser appuser && chown -R appuser:appuser /app
|
||||||
|
USER appuser
|
||||||
|
|
||||||
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s \
|
||||||
|
CMD curl -f http://localhost:9501/healthz || exit 1
|
||||||
|
|
||||||
# Entrypoint command to run the RoadRunner server with the specified configuration
|
# Entrypoint command to run the RoadRunner server with the specified configuration
|
||||||
ENTRYPOINT ["rr", "serve", "-c", ".rr.yaml", "-s"]
|
ENTRYPOINT ["rr", "serve"]
|
||||||
|
CMD ["-c", ".rr.yaml", "-s"]
|
||||||
Reference in New Issue
Block a user