Repository navigation
Expand file tree
/
Copy pathDockerfile.dev
More file actions
51 lines (44 loc) · 1.61 KB
/
Copy pathDockerfile.dev
File metadata and controls
51 lines (44 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM dunglas/frankenphp:php8.5
# Environment variables
ENV APP_ENV=prod
ENV PUID=1000
ENV PGID=1000
ENV USER=mendako
ENV FRANKENPHP_CONFIG="worker /app/public/public/index.php"
ENV FRANKENPHP_SERVER_NAME=":80"
ENV APP_RUNTIME="Symfony\\Component\\Runtime\\SymfonyRuntime"
ENV COMPOSER_ALLOW_SUPERUSER=1
COPY ./docker/Caddyfile-dev /etc/caddy/Caddyfile
# Install some basics dependencies
RUN apt-get update && \
apt-get install -y curl wget ffmpeg gnupg2 && \
# Add User and Group
addgroup --gid "$PGID" "$USER" && \
adduser --gecos '' --no-create-home --disabled-password --uid "$PUID" --gid "$PGID" "$USER" && \
# Nodejs
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
NODE_MAJOR=22 && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
# Install packages
apt-get update && \
apt-get install -y \
ca-certificates \
nodejs \
git \
ffmpeg \
unzip \
supervisor \
openssl && \
# Install PHP extensions
install-php-extensions opcache pdo_pgsql intl gd zip curl ; \
#Install composer dependencies
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
# Install javascript dependencies and build assets
corepack enable && \
# Add PHP config files
mkdir /run/php
EXPOSE 80
EXPOSE 443
WORKDIR /app/public
HEALTHCHECK CMD curl --fail http://localhost:80/ || exit 1
ENTRYPOINT ["sh", "/app/public/docker/entrypoint-dev.sh" ]