fix: switch to postgres
This commit is contained in:
parent
e78fb556a3
commit
9bc8c6bf60
|
@ -12,16 +12,16 @@ APP_FAKER_LOCALE=en_US
|
|||
APP_MAINTENANCE_DRIVER=file
|
||||
# APP_MAINTENANCE_STORE=database
|
||||
|
||||
BCRYPT_ROUNDS=12
|
||||
BCRYPT_ROUNDS=16
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
LOG_STACK=single
|
||||
LOG_DEPRECATIONS_CHANNEL=null
|
||||
LOG_LEVEL=debug
|
||||
|
||||
DB_CONNECTION=sqlite
|
||||
# DB_HOST=127.0.0.1
|
||||
# DB_PORT=3306
|
||||
DB_CONNECTION=pgsql
|
||||
# DB_HOST=psql
|
||||
# DB_PORT=5432
|
||||
# DB_DATABASE=laravel
|
||||
# DB_USERNAME=root
|
||||
# DB_PASSWORD=
|
||||
|
|
|
@ -22,33 +22,32 @@ services:
|
|||
networks:
|
||||
- sail
|
||||
depends_on:
|
||||
- mysql
|
||||
- psql
|
||||
- redis
|
||||
- meilisearch
|
||||
- mailpit
|
||||
- selenium
|
||||
mysql:
|
||||
image: 'mysql/mysql-server:8.0'
|
||||
psql:
|
||||
image: postgres:16-alpine3.20
|
||||
ports:
|
||||
- '${FORWARD_DB_PORT:-3306}:3306'
|
||||
- '${FORWARD_DB_PORT:-5432}:5432'
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
|
||||
MYSQL_ROOT_HOST: '%'
|
||||
MYSQL_DATABASE: '${DB_DATABASE}'
|
||||
MYSQL_USER: '${DB_USERNAME}'
|
||||
MYSQL_PASSWORD: '${DB_PASSWORD}'
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: 1
|
||||
POSTGRES_DB: '${DB_DATABASE}'
|
||||
POSTGRES_USER: '${DB_USERNAME}'
|
||||
POSTGRES_PASSWORD: '${DB_PASSWORD}'
|
||||
volumes:
|
||||
- 'sail-mysql:/var/lib/mysql'
|
||||
- './vendor/laravel/sail/database/mysql/create-testing-database.sh:/docker-entrypoint-initdb.d/10-create-testing-database.sh'
|
||||
- 'sail-postgresql:/var/lib/postgresql'
|
||||
networks:
|
||||
- sail
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD
|
||||
- mysqladmin
|
||||
- ping
|
||||
- '-p${DB_PASSWORD}'
|
||||
- pg_isready
|
||||
- -q
|
||||
- -d
|
||||
- '${DB_DATABASE}'
|
||||
- '-U'
|
||||
- '${DB_USERNAME}'
|
||||
retries: 3
|
||||
timeout: 5s
|
||||
redis:
|
||||
|
@ -104,7 +103,7 @@ networks:
|
|||
sail:
|
||||
driver: bridge
|
||||
volumes:
|
||||
sail-mysql:
|
||||
sail-postgresql:
|
||||
driver: local
|
||||
sail-redis:
|
||||
driver: local
|
||||
|
|
Loading…
Reference in New Issue