Skip to content

Commit 911d6e8

Browse files
committed
Add custom file with env vars for the standalone image
1 parent 6aac10c commit 911d6e8

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

Dockerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ RUN set -e; \
4545
caddy \
4646
curl \
4747
git \
48+
openssl \
4849
php82 \
4950
php82-ctype \
5051
php82-curl \
@@ -80,17 +81,14 @@ COPY docker/scripts /srv/scripts/
8081

8182
USER dirigent
8283

83-
ENV APP_ENV="prod"
84-
ENV DATABASE_URL="postgresql://dirigent@127.0.0.1:5432/dirigent?serverVersion=16&charset=utf8"
85-
ENV DIRIGENT_IMAGE=1
86-
8784
WORKDIR /srv/app
8885

8986
COPY --chown=$UID:$GID --from=composer_build /srv/app ./
9087
COPY --chown=$UID:$GID --from=node_build /srv/app/public/build public/build/
9188
COPY --chown=$UID:$GID readme.md license.md ./
92-
COPY --chown=$UID:$GID .env.dirigent ./
9389
COPY --chown=$UID:$GID bin/console bin/dirigent bin/
90+
COPY --chown=$UID:$GID docker/dirigent.yaml /srv/app/config/
91+
COPY --chown=$UID:$GID docker/env.php ./.env.dirigent.local.php
9492
COPY --chown=$UID:$GID config config/
9593
COPY --chown=$UID:$GID docs docs/
9694
COPY --chown=$UID:$GID migrations migrations/
@@ -104,6 +102,7 @@ RUN set -e; \
104102
chmod +x bin/dirigent; \
105103
composer dump-autoload --classmap-authoritative --no-ansi --no-interaction;
106104

105+
VOLUME /srv/config
107106
VOLUME /srv/data
108107

109108
EXPOSE 7015

docker/env.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
return [
4+
'APP_ENV' => 'prod',
5+
'DATABASE_URL' => 'postgresql://dirigent@127.0.0.1:5432/dirigent?serverVersion=16&charset=utf8',
6+
'DIRIGENT_IMAGE' => '1',
7+
'GITHUB_TOKEN' => '',
8+
'MAILER_DSN' => 'null://null',
9+
'MESSENGER_TRANSPORT_DSN' => 'doctrine://default?auto_setup=0',
10+
'SENTRY_DSN' => '',
11+
'SYMFONY_DOTENV_PATH' => './.env.dirigent',
12+
'TRUSTED_PROXIES' => '',
13+
];

0 commit comments

Comments
 (0)