Browse Source

Merge pull request #1 from mikeilabs/deployment

imwald
Nusa 7 months ago committed by GitHub
parent
commit
6fde7d979d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      Dockerfile
  2. 1
      asset_map_compile.sh
  3. 7
      compose.prod.yaml
  4. 5
      config/packages/framework.yaml
  5. 2
      templates/pages/article.html.twig

1
Dockerfile

@ -22,6 +22,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -22,6 +22,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
file \
gettext \
git \
bash \
libnss3-tools \
cron \
&& rm -rf /var/lib/apt/lists/*

1
asset_map_compile.sh

@ -0,0 +1 @@ @@ -0,0 +1 @@
docker exec newsroom-php-1 php bin/console asset-map:compile

7
compose.prod.yaml

@ -6,5 +6,12 @@ services: @@ -6,5 +6,12 @@ services:
target: frankenphp_prod
environment:
APP_SECRET: ${APP_SECRET}
TRUSTED_PROXIES: ${TRUSTED_PROXIES:-127.0.0.0/8,10.0.0.0/8}
SERVER_NAME: :80
MERCURE_PUBLISHER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET}
MERCURE_SUBSCRIBER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET}
ports:
# HTTP
- target: 80
published: 80
protocol: tcp

5
config/packages/framework.yaml

@ -9,7 +9,10 @@ framework: @@ -9,7 +9,10 @@ framework:
cookie_secure: auto
cookie_samesite: lax
cookie_lifetime: 0 # integer, lifetime in seconds, 0 means 'valid for the length of the browser session'
trusted_proxies: '%env(TRUSTED_PROXIES)%'
trusted_headers: ['forwarded', 'x-forwarded-for', 'x-forwarded-proto']
# trusted_proxies: '%env(TRUSTED_PROXIES)%'
#trusted_proxies: 'symfony,REMOTE_ADDR'
#esi: true
#fragments: true

2
templates/pages/article.html.twig

@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
<div class="byline">
<span>
{{ 'text.byline'|trans }} <a href="{{ path('author-redirect', {'pubkey': article.pubkey}) }}">
<twig:atoms:NameOrNpub :author="author" :npub="npub" />
<twig:Atoms:NameOrNpub :author="author" :npub="npub" />
</a>
</span>
<span>

Loading…
Cancel
Save