Skip to content

Commit

Permalink
Update Dockerfile and add Caddyfile for backend
Browse files Browse the repository at this point in the history
  • Loading branch information
flemming-pr committed Jan 4, 2024
1 parent ec06c7d commit 72fbbaf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
11 changes: 6 additions & 5 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM php:8.2-cli-alpine3.18 AS build
FROM php:8.3-cli-alpine3.18 AS build

RUN mkdir -p /var/www/html
RUN mkdir -p /var/www/html/databasestore

WORKDIR /var/www/html

Expand All @@ -17,8 +16,6 @@ RUN mkdir -p /var/www/html

WORKDIR /app/public

COPY --from=build /var/www/html /app/public

ENV TZ=Europe/Berlin

RUN apt-get update && \
Expand All @@ -32,7 +29,11 @@ RUN install-php-extensions \
zip \
opcache

COPY --from=build /var/www/html /app/public

RUN chmod +x /app/public/docker/entrypoint.sh

EXPOSE 80

ENTRYPOINT ["/app/public/docker/entrypoint.sh"]
CMD [ "frankenphp", "run", "--config", "/etc/caddy/Caddyfile" ]
CMD [ "frankenphp", "run", "--config", "/app/public/docker/Caddyfile" ]
9 changes: 9 additions & 0 deletions backend/docker/Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
# Enable FrankenPHP
frankenphp
# Configure when the directive must be executed
order php_server before file_server
# Disable tls
tls off
# Define the port to listen on
}

0 comments on commit 72fbbaf

Please sign in to comment.