Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adaptated the docauposte2 scripts to efnc to allow installation on po… #122

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,6 @@ temp

docker-compose.override.yml
database.test.tar.gz
doc.test.tar.gz
doc.test.tar.gz
efnc.yml
/secrets
17 changes: 13 additions & 4 deletions config/packages/framework.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# see https://symfony.com/doc/current/reference/configuration/framework.html
framework:
secret: '%env(APP_SECRET)%'
secret: "%env(APP_SECRET)%"
#csrf_protection: true
http_method_override: false
handle_all_throwables: true
router:
default_uri: http://'%env(HOSTNAME)%'/docauposte

# Enables session support. Note that the session will ONLY be started if you read or write from it.
# Remove or comment this section to explicitly disable session support.
Expand All @@ -12,17 +14,24 @@ framework:
cookie_secure: auto
cookie_samesite: lax
storage_factory_id: session.storage.factory.native
gc_maxlifetime: 1800 # Session lifetime in seconds (e.g., 30 minutes)

#esi: true
#fragments: true
php_errors:
log: true


# the IP address (or range) of your proxy
trusted_proxies: '172.22.0.254/16'
trusted_proxies: "10.89.0.0/24, 172.22.0.254/16"
# trust *all* "X-Forwarded-*" headers
trusted_headers: ['x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto', 'x-forwarded-port', 'x-forwarded-prefix']
trusted_headers:
[
"x-forwarded-for",
"x-forwarded-host",
"x-forwarded-proto",
"x-forwarded-port",
"x-forwarded-prefix",
]
# or, if your proxy instead uses the "Forwarded" header
# trusted_headers: ['forwarded']

Expand Down
4 changes: 4 additions & 0 deletions config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
# https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration
parameters:
app.timezone: '%env(APP_TIMEZONE)%'
router.request_context.host: "%env(HOSTNAME)%"
# router.request_context.base_url: /efnc
# router.request_context.prefix: /efnc

services:
# default configuration for services in *this* file
_defaults:
Expand Down
117 changes: 117 additions & 0 deletions efnc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
apiVersion: v1
kind: Service
metadata:
name: efnc-database-service
spec:
selector:
app: efnc-database
ports:
- port: 3307
---
apiVersion: v1
kind: Pod
metadata:
name: efnc-database-pod
labels:
app: efnc-database
spec:
restartPolicy: Always
containers:
- name: database
image: docker.io/library/mariadb:latest
env:
- name: MARIADB_ROOT_PASSWORD_FILE
value: run/secrets/root_password
- name: MARIADB_DATABASE_FILE
value: run/secrets/database_name
- name: MARIADB_USER_FILE
value: run/secrets/database_user
- name: MARIADB_PASSWORD_FILE
value: run/secrets/database_password
ports:
- containerPort: 3307
volumeMounts :
- name: secrets
mountPath: /run/secrets
readOnly: true
- mountPath: /var/lib/mysql
name: database-data
dnsPolicy: Default
volumes:
- name: secrets
hostPath:
path: ./secrets
type: Directory
- hostPath:
path: ./database_data
type: DirectoryOrCreate
name: database-data
---
apiVersion: v1
kind: Pod
metadata:
name: efnc-phpmyadmin-pod
labels:
app: efnc-phpmyadmin
traefik.enable: true
traefik.http.routers.efnc-phpmyadmin.rule: PathPrefix(`/efncpma`)
traefik.http.routers.efnc-phpmyadmin.entrypoints: web
traefik.http.routers.efnc-phpmyadmin.middlewares: strip-efnc-phpmyadmin-prefix
traefik.http.services.efnc-phpmyadmin.loadbalancer.server.port: 80
traefik.http.middlewares.strip-efnc-phpmyadmin-prefix.stripPrefix.prefixes: /efncpma
spec:
restartPolicy: Always
containers:
- name: phpmyadmin
image: docker.io/phpmyadmin/phpmyadmin
env:
- name: PMA_HOST
value: efnc-database-pod
- name: PMA_ABSOLUTE_URI
value: http://sanclp0031/efncpma/
volumeMounts:
- mountPath: /etc/phpmyadmin/config.user.inc.php
name: phpmyadmin-config
dnsPolicy: Default
volumes:
- hostPath:
path: ./config.user.inc.php
type: File
name: phpmyadmin-config
---
apiVersion: v1
kind: Pod
metadata:
name: efnc-web-pod
labels:
app: efnc-web
traefik.enable: true
traefik.http.routers.efnc-web.rule: PathPrefix(`/efnc`)
traefik.http.routers.efnc-web.entrypoints: web
traefik.http.routers.efnc-web.middlewares: strip-efnc-web-prefix
traefik.http.services.efnc-web.loadbalancer.server.port: 80
traefik.http.middlewares.strip-efnc-web-prefix.stripPrefix.prefixes: /efnc
spec:
restartPolicy: Always
containers:
- name: web
image: ghcr.io/kiloutyg/efnc:main
command: ["./dev-entrypoint.sh"]
env:
- name: no_proxy
value: .ponet
- name: http_proxy
value: http://10.0.0.1:80
- name: APP_TIMEZONE
value: Europe/Paris
- name: https_proxy
value: http://10.0.0.1:80
volumeMounts:
- mountPath: /var/www
name: web-data
dnsPolicy: Default
volumes:
- hostPath:
path: ./
type: Directory
name: web-data
File renamed without changes.
Loading
Loading