Skip to content
This repository was archived by the owner on Mar 19, 2025. It is now read-only.

Commit 5818708

Browse files
committed
[CD] wip
1 parent 4e296a5 commit 5818708

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

.github/workflows/build-and-deploy.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,4 @@ jobs:
7272
--volume=./maps:/app/storage/app/private \
7373
--volume=./caddy_config:/config \
7474
--volume=./data:/data \
75-
ghcr.io/$IMAGE_NAME:latest
76-
docker exec -it mapdb2 php artisan optimize
75+
ghcr.io/$IMAGE_NAME:latest

docker/frankenphp/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ RUN adduser --uid $UID -D ${USER} && \
2323
chown -R ${USER}:${USER} /data/caddy /config/caddy /app && \
2424
chmod 775 /app
2525

26+
COPY --chown=${USER}:${USER} docker/frankenphp/start.sh /usr/local/bin/start.sh
27+
RUN chmod +x /usr/local/bin/start.sh
28+
2629
WORKDIR /app
2730
USER ${USER}
2831

@@ -47,5 +50,5 @@ FROM phpbuilder AS app
4750
RUN composer dump-autoload -o
4851

4952
EXPOSE 8000
50-
ENTRYPOINT ["php", "/app/artisan", "octane:frankenphp"]
53+
ENTRYPOINT ["/usr/local/bin/start.sh"]
5154
HEALTHCHECK --start-period=5s --interval=10s --timeout=5s --retries=8 CMD php /app/artisan octane:status || exit 1

docker/frankenphp/start.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
3+
# Exit immediately if a command exits with a non-zero status
4+
set -e
5+
6+
# Run Laravel optimizations
7+
php /app/artisan optimize
8+
9+
# Start the application
10+
exec php /app/artisan octane:frankenphp

0 commit comments

Comments
 (0)