update
This commit is contained in:
parent
2e425e16e0
commit
9bd0da35cc
8
.docker/launch.sh
Normal file
8
.docker/launch.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
if [ ! -d /var/www/html/vendor ]; then
|
||||||
|
echo "[INFO] Vendor folder not present - installing dependencies"
|
||||||
|
cd /var/www/html
|
||||||
|
composer install
|
||||||
|
echo "[INFO] Dependencies installed"
|
||||||
|
else
|
||||||
|
echo "[INFO] Vendor folder already present, nothing to do."
|
||||||
|
fi
|
@ -7,13 +7,14 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
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"
|
|
||||||
TRUSTED_PROXIES: "0.0.0.0/0"
|
TRUSTED_PROXIES: "0.0.0.0/0"
|
||||||
|
PHP_IDE_CONFIG: "serverName=docker"
|
||||||
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"
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/var/www/html
|
- ./:/var/www/html
|
||||||
|
- ./.docker/launch.sh:/docker-entrypoint-init.d/launch.sh
|
||||||
#ports:
|
#ports:
|
||||||
# - "8000:8080"
|
# - "8000:8080"
|
||||||
#extra_hosts:
|
#extra_hosts:
|
||||||
@ -27,6 +28,7 @@ services:
|
|||||||
image: adminer
|
image: adminer
|
||||||
networks:
|
networks:
|
||||||
- traefik
|
- traefik
|
||||||
|
- default
|
||||||
environment:
|
environment:
|
||||||
ADMINER_DEFAULT_DB_HOST: database
|
ADMINER_DEFAULT_DB_HOST: database
|
||||||
ADMINER_DEFAULT_DB_NAME: app
|
ADMINER_DEFAULT_DB_NAME: app
|
||||||
@ -34,11 +36,12 @@ services:
|
|||||||
#ports:
|
#ports:
|
||||||
# - "8080:8080"
|
# - "8080:8080"
|
||||||
labels:
|
labels:
|
||||||
- "traefik.http.routers.app_adminer.rule=Host(`localhost`) && PathPrefix(`/adminer/`)"
|
- "traefik.http.routers.app_adminer.rule=Host(`localhost`) && PathPrefix(`/adminer`)"
|
||||||
- "traefik.http.services.app_adminer.loadbalancer.server.port=8080"
|
- "traefik.http.services.app_adminer.loadbalancer.server.port=8080"
|
||||||
- "traefik.http.routers.app_adminer.middlewares=app_adminer_strip"
|
- "traefik.http.routers.app_adminer.middlewares=app_adminer_strip"
|
||||||
- "traefik.http.middlewares.app_adminer_strip.stripprefix.prefixes=/adminer"
|
- "traefik.http.middlewares.app_adminer_strip.stripprefix.prefixes=/adminer/"
|
||||||
- "traefik.http.middlewares.app_adminer_strip.stripprefix.forceslash=false"
|
- "traefik.http.middlewares.app_adminer_strip.stripprefix.forceslash=false"
|
||||||
|
- "traefik.docker.network=traefik"
|
||||||
|
|
||||||
mailer:
|
mailer:
|
||||||
image: sj26/mailcatcher
|
image: sj26/mailcatcher
|
||||||
@ -46,6 +49,7 @@ services:
|
|||||||
HTTPPATH: "mailer"
|
HTTPPATH: "mailer"
|
||||||
networks:
|
networks:
|
||||||
- traefik
|
- traefik
|
||||||
|
- default
|
||||||
command:
|
command:
|
||||||
- "--ip"
|
- "--ip"
|
||||||
- "0.0.0.0"
|
- "0.0.0.0"
|
||||||
@ -56,3 +60,4 @@ services:
|
|||||||
labels:
|
labels:
|
||||||
- "traefik.http.routers.app_mailer.rule=Host(`localhost`) && PathPrefix(`/mailer`)"
|
- "traefik.http.routers.app_mailer.rule=Host(`localhost`) && PathPrefix(`/mailer`)"
|
||||||
- "traefik.http.services.app_mailer.loadbalancer.server.port=1080"
|
- "traefik.http.services.app_mailer.loadbalancer.server.port=1080"
|
||||||
|
- "traefik.docker.network=traefik"
|
||||||
|
@ -5,6 +5,7 @@ services:
|
|||||||
image: larueli/app
|
image: larueli/app
|
||||||
networks:
|
networks:
|
||||||
- traefik
|
- traefik
|
||||||
|
- default
|
||||||
environment:
|
environment:
|
||||||
APACHE_DOCUMENT_ROOT: /var/www/html/public
|
APACHE_DOCUMENT_ROOT: /var/www/html/public
|
||||||
TZ: Europe/Paris
|
TZ: Europe/Paris
|
||||||
@ -17,9 +18,12 @@ services:
|
|||||||
- "traefik.http.routers.app.middlewares=app_strip"
|
- "traefik.http.routers.app.middlewares=app_strip"
|
||||||
- "traefik.http.middlewares.app.stripprefix.prefixes=/api"
|
- "traefik.http.middlewares.app.stripprefix.prefixes=/api"
|
||||||
- "traefik.http.middlewares.app.stripprefix.forceslash=false"
|
- "traefik.http.middlewares.app.stripprefix.forceslash=false"
|
||||||
|
- "traefik.docker.network=traefik"
|
||||||
|
|
||||||
database:
|
database:
|
||||||
image: postgres:15.1
|
image: postgres:15.1
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_DB: app
|
POSTGRES_DB: app
|
||||||
POSTGRES_PASSWORD: app
|
POSTGRES_PASSWORD: app
|
||||||
@ -32,5 +36,21 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- database-data:/var/lib/postgresql/data:rw
|
- database-data:/var/lib/postgresql/data:rw
|
||||||
|
|
||||||
|
# database:
|
||||||
|
# image: "mariadb:10.11"
|
||||||
|
# healthcheck:
|
||||||
|
# test: ["CMD-SHELL", "mysql $$MARIADB_DATABASE -u$$MARIADB_USER -p$$MARIADB_PASSWORD -e 'SELECT 1;' || exit 1"]
|
||||||
|
# interval: 5s
|
||||||
|
# retries: 10
|
||||||
|
# networks:
|
||||||
|
# - default
|
||||||
|
# volumes:
|
||||||
|
# - database-data:/var/lib/mysql
|
||||||
|
# environment:
|
||||||
|
# MARIADB_ROOT_PASSWORD: abcdef
|
||||||
|
# MARIADB_DATABASE: etuutt
|
||||||
|
# MARIADB_USER: etuutt
|
||||||
|
# MARIADB_PASSWORD: abcdef
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
database-data:
|
database-data:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user