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:
|
||||
DATABASE_URL: "postgresql://app:app@database:5432/app?serverVersion=14&charset=utf8"
|
||||
MAILER_DSN: "smtp://mailer:1025"
|
||||
PHP_IDE_CONFIG: "serverName=docker"
|
||||
TRUSTED_PROXIES: "0.0.0.0/0"
|
||||
PHP_IDE_CONFIG: "serverName=docker"
|
||||
XDEBUG_MODE: "develop,debug" # profile,coverage
|
||||
XDEBUG_CONFIG: "client_host=host.docker.internal"
|
||||
XDEBUG_TRIGGER: "yes"
|
||||
volumes:
|
||||
- ./:/var/www/html
|
||||
- ./.docker/launch.sh:/docker-entrypoint-init.d/launch.sh
|
||||
#ports:
|
||||
# - "8000:8080"
|
||||
#extra_hosts:
|
||||
@ -27,6 +28,7 @@ services:
|
||||
image: adminer
|
||||
networks:
|
||||
- traefik
|
||||
- default
|
||||
environment:
|
||||
ADMINER_DEFAULT_DB_HOST: database
|
||||
ADMINER_DEFAULT_DB_NAME: app
|
||||
@ -34,11 +36,12 @@ services:
|
||||
#ports:
|
||||
# - "8080:8080"
|
||||
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.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.docker.network=traefik"
|
||||
|
||||
mailer:
|
||||
image: sj26/mailcatcher
|
||||
@ -46,6 +49,7 @@ services:
|
||||
HTTPPATH: "mailer"
|
||||
networks:
|
||||
- traefik
|
||||
- default
|
||||
command:
|
||||
- "--ip"
|
||||
- "0.0.0.0"
|
||||
@ -56,3 +60,4 @@ services:
|
||||
labels:
|
||||
- "traefik.http.routers.app_mailer.rule=Host(`localhost`) && PathPrefix(`/mailer`)"
|
||||
- "traefik.http.services.app_mailer.loadbalancer.server.port=1080"
|
||||
- "traefik.docker.network=traefik"
|
||||
|
@ -5,6 +5,7 @@ services:
|
||||
image: larueli/app
|
||||
networks:
|
||||
- traefik
|
||||
- default
|
||||
environment:
|
||||
APACHE_DOCUMENT_ROOT: /var/www/html/public
|
||||
TZ: Europe/Paris
|
||||
@ -17,9 +18,12 @@ services:
|
||||
- "traefik.http.routers.app.middlewares=app_strip"
|
||||
- "traefik.http.middlewares.app.stripprefix.prefixes=/api"
|
||||
- "traefik.http.middlewares.app.stripprefix.forceslash=false"
|
||||
- "traefik.docker.network=traefik"
|
||||
|
||||
database:
|
||||
image: postgres:15.1
|
||||
networks:
|
||||
- default
|
||||
environment:
|
||||
POSTGRES_DB: app
|
||||
POSTGRES_PASSWORD: app
|
||||
@ -32,5 +36,21 @@ services:
|
||||
volumes:
|
||||
- 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:
|
||||
database-data:
|
||||
|
Loading…
x
Reference in New Issue
Block a user