various fixes
This commit is contained in:
parent
6070adcae1
commit
2e425e16e0
@ -73,3 +73,4 @@ framework:
|
|||||||
```
|
```
|
||||||
|
|
||||||
définir la variable d'env TRUSTED_PROXIES avec le/les réseaux ou IP spécfiques (séparés par des virgules, réseaux en notation CIDR)
|
définir la variable d'env TRUSTED_PROXIES avec le/les réseaux ou IP spécfiques (séparés par des virgules, réseaux en notation CIDR)
|
||||||
|
dans le `.env` : `TRUSTED_PROXIES=""`
|
@ -8,6 +8,7 @@ services:
|
|||||||
DATABASE_URL: "postgresql://app:app@database:5432/app?serverVersion=14&charset=utf8"
|
DATABASE_URL: "postgresql://app:app@database:5432/app?serverVersion=14&charset=utf8"
|
||||||
MAILER_DSN: "smtp://mailer:1025"
|
MAILER_DSN: "smtp://mailer:1025"
|
||||||
PHP_IDE_CONFIG: "serverName=docker"
|
PHP_IDE_CONFIG: "serverName=docker"
|
||||||
|
TRUSTED_PROXIES: "0.0.0.0/0"
|
||||||
XDEBUG_MODE: "develop,debug" # profile,coverage
|
XDEBUG_MODE: "develop,debug" # profile,coverage
|
||||||
XDEBUG_CONFIG: "client_host=host.docker.internal"
|
XDEBUG_CONFIG: "client_host=host.docker.internal"
|
||||||
XDEBUG_TRIGGER: "yes"
|
XDEBUG_TRIGGER: "yes"
|
||||||
|
31
docker-compose.traefik.yml
Normal file
31
docker-compose.traefik.yml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# This must be done only once for every computer (it can be used for every web project, not only this one)
|
||||||
|
# 1. Launch WSL/Ubuntu
|
||||||
|
# 2. Go to your etuutt-api directory
|
||||||
|
# 3. Create traefik docker-compose : `mkdir -p ${HOME}/programmation/traefik && cp docker-compose.traefik.yml ${HOME}/programmation/traefik/docker-compose.yml && cd ${HOME}/programmation/traefik`
|
||||||
|
# 4. Create docker network for traefik to link all containers to it : `docker network create traefik`
|
||||||
|
# 5. Launch it : `cd ${HOME}/programmation/traefik && docker compose up -d`
|
||||||
|
|
||||||
|
# Thanks to the `restart: always` directive, traefik will launch every time docker launches, so no need to launch it by hand every time. It uses very few ram and cpu.
|
||||||
|
# If you still want to shut it down for good : `cd ${HOME}/programmation/traefik && docker compose down`
|
||||||
|
# To restart it : `cd ${HOME}/programmation/traefik && docker compose up -d`
|
||||||
|
|
||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
reverse-proxy:
|
||||||
|
image: traefik:v2.9
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- traefik
|
||||||
|
command:
|
||||||
|
- '--api.insecure=true'
|
||||||
|
- '--providers.docker'
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
- "9081:8080" # UI
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
|
||||||
|
networks:
|
||||||
|
traefik:
|
||||||
|
external: true
|
@ -30,7 +30,7 @@ services:
|
|||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
volumes:
|
volumes:
|
||||||
- db-data:/var/lib/postgresql/data:rw
|
- database-data:/var/lib/postgresql/data:rw
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
db-data:
|
database-data:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user