File tree Expand file tree Collapse file tree 5 files changed +34
-1
lines changed
Expand file tree Collapse file tree 5 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ COPY --chown=$UID:$GID --from=composer_build /srv/app ./
8787COPY --chown=$UID:$GID --from=node_build /srv/app/public/build public/build/
8888COPY --chown=$UID:$GID readme.md license.md ./
8989COPY --chown=$UID:$GID bin/console bin/dirigent bin/
90- COPY --chown=$UID:$GID docker/dirigent .yaml /srv/app/ config/
90+ COPY --chown=$UID:$GID docker/config .yaml config/dirigent.yaml
9191COPY --chown=$UID:$GID docker/env.php ./.env.dirigent.local.php
9292COPY --chown=$UID:$GID config config/
9393COPY --chown=$UID:$GID docs docs/
Original file line number Diff line number Diff line change 1+ framework :
2+ secret : ' %env(file:KERNEL_SECRET_FILE)%'
Original file line number Diff line number Diff line change 55 'DATABASE_URL ' => 'postgresql://dirigent@127.0.0.1:5432/dirigent?serverVersion=16&charset=utf8 ' ,
66 'DIRIGENT_IMAGE ' => '1 ' ,
77 'GITHUB_TOKEN ' => '' ,
8+ 'KERNEL_SECRET_FILE ' => '/srv/config/secrets/kernel_secret ' ,
89 'MAILER_DSN ' => 'null://null ' ,
910 'MESSENGER_TRANSPORT_DSN ' => 'doctrine://default?auto_setup=0 ' ,
1011 'SENTRY_DSN ' => '' ,
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env sh
2+
3+ set -e
4+
5+ if [ -f " /srv/config/secrets/kernel_secret" ]; then
6+ echo " Kernel secret exists"
7+ fi
8+
9+ # Make sure secrets directory exists
10+ mkdir -p /srv/config/secrets
11+
12+ # Generate a kernel secret and save the value
13+ secret=$( openssl rand -base64 12)
14+ echo $secret > /srv/config/secrets/kernel_secret
15+
16+ echo " Generated a new kernel secret"
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace CodedMonkey \Dirigent \Tests \Docker \Standalone ;
4+
5+ class InitTest extends DockerStandaloneTestCase
6+ {
7+ public function testKernelSecretGenerated (): void
8+ {
9+ $ this ->assertContainerFileExists (
10+ '/srv/config/secrets/kernel_secret ' ,
11+ 'A kernel_secret file must be generated. ' ,
12+ );
13+ }
14+ }
You can’t perform that action at this time.
0 commit comments