@@ -15,7 +15,7 @@ RUN composer install \
1515 --no-scripts \
1616 --prefer-dist
1717
18- FROM node:latest AS node_build
18+ FROM node:23 AS node_build
1919
2020WORKDIR /srv/app
2121
@@ -35,6 +35,8 @@ LABEL org.opencontainers.image.licenses=FSL-1.1-MIT
3535ARG UID=1000
3636ARG GID=1000
3737
38+ COPY docker/entrypoint.sh docker/init.sh /srv/
39+
3840RUN set -e; \
3941 addgroup -g $GID -S dirigent; \
4042 adduser -u $UID -S -G dirigent dirigent; \
@@ -43,6 +45,7 @@ RUN set -e; \
4345 caddy \
4446 curl \
4547 git \
48+ openssl \
4649 php82 \
4750 php82-ctype \
4851 php82-curl \
@@ -64,44 +67,45 @@ RUN set -e; \
6467 supervisor; \
6568 ln -s /usr/sbin/php-fpm82 /usr/sbin/php-fpm; \
6669 mkdir -p /run/postgresql /srv/config /srv/data; \
67- chown -R dirigent:dirigent /run /srv;
70+ chown -R dirigent:dirigent /run /srv; \
71+ chmod +x /srv/entrypoint.sh /srv/init.sh;
6872
6973COPY --from=composer_build /usr/bin/composer /usr/bin/composer
7074
71- COPY docker/init.sh /
7275COPY docker/Caddyfile /etc/caddy/
7376COPY docker/php.ini /etc/php82/conf.d/
7477COPY docker/php-fpm.conf /etc/php82/
7578COPY docker/supervisord.conf /etc/
7679COPY docker/process /srv/process/
80+ COPY docker/scripts /srv/scripts/
7781
7882USER dirigent
7983
80- ENV APP_ENV="prod"
81- ENV DATABASE_URL="postgresql://dirigent@127.0.0.1:5432/dirigent?serverVersion=16&charset=utf8"
82- ENV DIRIGENT_IMAGE=1
83-
8484WORKDIR /srv/app
8585
86- COPY --chown=dirigent:dirigent --from=composer_build /srv/app ./
87- COPY --chown=dirigent:dirigent --from=node_build /srv/app/public/build public/build/
88- COPY --chown=dirigent:dirigent readme.md license.md ./
89- COPY --chown=dirigent:dirigent .env.dirigent ./
90- COPY --chown=dirigent:dirigent bin bin/
91- COPY --chown=dirigent:dirigent config config/
92- COPY --chown=dirigent:dirigent migrations migrations/
93- COPY --chown=dirigent:dirigent public public/
94- COPY --chown=dirigent:dirigent src src/
95- COPY --chown=dirigent:dirigent translations translations/
96- COPY --chown=dirigent:dirigent templates templates/
86+ COPY --chown=$UID:$GID --from=composer_build /srv/app ./
87+ COPY --chown=$UID:$GID --from=node_build /srv/app/public/build public/build/
88+ COPY --chown=$UID:$GID readme.md license.md ./
89+ COPY --chown=$UID:$GID bin/console bin/dirigent bin/
90+ COPY --chown=$UID:$GID docker/config.yaml config/dirigent.yaml
91+ COPY --chown=$UID:$GID docker/env.php ./.env.dirigent.local.php
92+ COPY --chown=$UID:$GID config config/
93+ COPY --chown=$UID:$GID docs docs/
94+ COPY --chown=$UID:$GID migrations migrations/
95+ COPY --chown=$UID:$GID public public/
96+ COPY --chown=$UID:$GID src src/
97+ COPY --chown=$UID:$GID translations translations/
98+ COPY --chown=$UID:$GID templates templates/
9799
98100RUN set -e; \
99101 chmod +x bin/console; \
100102 chmod +x bin/dirigent; \
101- composer dump-autoload --classmap-authoritative --no-ansi --no-interaction
103+ composer dump-autoload --classmap-authoritative --no-ansi --no-interaction;
102104
105+ VOLUME /srv/config
103106VOLUME /srv/data
104107
105108EXPOSE 7015
106109
107- CMD ["sh" , "/init.sh" ]
110+ ENTRYPOINT ["/srv/entrypoint.sh" ]
111+ CMD ["-init" ]
0 commit comments