Refactor code structure for improved readability and maintainability
This commit is contained in:
parent
17bbf8d0e6
commit
79177ad738
@ -1,50 +1,54 @@
|
|||||||
# For more information: https://laravel.com/docs/sail
|
|
||||||
version: '3'
|
|
||||||
services:
|
services:
|
||||||
laravel.test:
|
php:
|
||||||
|
image: smartenergyview/smartenergyview-backend:latest
|
||||||
build:
|
build:
|
||||||
context: ./vendor/laravel/sail/runtimes/8.1
|
context: ..
|
||||||
dockerfile: Dockerfile
|
dockerfile: docker/php/Dockerfile
|
||||||
args:
|
container_name: smartEnergyView-php
|
||||||
WWWGROUP: '${WWWGROUP}'
|
restart: unless-stopped
|
||||||
image: sail-8.1/app
|
env_file:
|
||||||
extra_hosts:
|
- .env
|
||||||
- 'host.docker.internal:host-gateway'
|
expose:
|
||||||
ports:
|
- "9000"
|
||||||
- '${APP_PORT:-80}:80'
|
|
||||||
- '${HMR_PORT:-8080}:8080'
|
|
||||||
environment:
|
|
||||||
WWWUSER: '${WWWUSER}'
|
|
||||||
LARAVEL_SAIL: 1
|
|
||||||
XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}'
|
|
||||||
XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}'
|
|
||||||
volumes:
|
|
||||||
- '.:/var/www/html'
|
|
||||||
networks:
|
networks:
|
||||||
- sail
|
- app_net
|
||||||
|
|
||||||
|
nginx:
|
||||||
|
image: nginx:1.26-alpine
|
||||||
|
container_name: smartEnergyView-nginx
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "8000:80"
|
||||||
|
volumes:
|
||||||
|
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
- pgsql
|
- php
|
||||||
pgsql:
|
networks:
|
||||||
image: 'postgres:14'
|
- app_net
|
||||||
ports:
|
|
||||||
- '${FORWARD_DB_PORT:-5432}:5432'
|
postgres:
|
||||||
|
image: postgres:16-alpine
|
||||||
|
container_name: smartEnergyView-postgres
|
||||||
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
PGPASSWORD: '${DB_PASSWORD:-secret}'
|
POSTGRES_DB: smartenergiaprod
|
||||||
POSTGRES_DB: '${DB_DATABASE}'
|
POSTGRES_USER: postgres
|
||||||
POSTGRES_USER: '${DB_USERNAME}'
|
POSTGRES_PASSWORD: VfHml#Z78!%kvvNM
|
||||||
POSTGRES_PASSWORD: '${DB_PASSWORD:-secret}'
|
|
||||||
volumes:
|
volumes:
|
||||||
- 'sail-pgsql:/var/lib/postgresql/data'
|
- pgdata:/var/lib/postgresql/data
|
||||||
- './vendor/laravel/sail/database/pgsql/create-testing-database.sql:/docker-entrypoint-initdb.d/10-create-testing-database.sql'
|
|
||||||
networks:
|
networks:
|
||||||
- sail
|
- app_net
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "pg_isready", "-q", "-d", "${DB_DATABASE}", "-U", "${DB_USERNAME}"]
|
redis:
|
||||||
retries: 3
|
image: redis:7-alpine
|
||||||
timeout: 5s
|
container_name: smartEnergyView-redis
|
||||||
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
sail:
|
- app_net
|
||||||
|
|
||||||
|
networks:
|
||||||
|
app_net:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
sail-pgsql:
|
pgdata:
|
||||||
driver: local
|
|
||||||
|
|||||||
10006
package-lock.json
generated
Normal file
10006
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user