fix: switch to postgres

This commit is contained in:
b1ek 2024-08-29 18:15:12 +10:00
parent e78fb556a3
commit 9bc8c6bf60
Signed by: blek
GPG Key ID: 14546221E3595D0C
2 changed files with 19 additions and 20 deletions

View File

@ -12,16 +12,16 @@ APP_FAKER_LOCALE=en_US
APP_MAINTENANCE_DRIVER=file APP_MAINTENANCE_DRIVER=file
# APP_MAINTENANCE_STORE=database # APP_MAINTENANCE_STORE=database
BCRYPT_ROUNDS=12 BCRYPT_ROUNDS=16
LOG_CHANNEL=stack LOG_CHANNEL=stack
LOG_STACK=single LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug LOG_LEVEL=debug
DB_CONNECTION=sqlite DB_CONNECTION=pgsql
# DB_HOST=127.0.0.1 # DB_HOST=psql
# DB_PORT=3306 # DB_PORT=5432
# DB_DATABASE=laravel # DB_DATABASE=laravel
# DB_USERNAME=root # DB_USERNAME=root
# DB_PASSWORD= # DB_PASSWORD=

View File

@ -22,33 +22,32 @@ services:
networks: networks:
- sail - sail
depends_on: depends_on:
- mysql - psql
- redis - redis
- meilisearch - meilisearch
- mailpit - mailpit
- selenium - selenium
mysql: psql:
image: 'mysql/mysql-server:8.0' image: postgres:16-alpine3.20
ports: ports:
- '${FORWARD_DB_PORT:-3306}:3306' - '${FORWARD_DB_PORT:-5432}:5432'
environment: environment:
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}' POSTGRES_DB: '${DB_DATABASE}'
MYSQL_ROOT_HOST: '%' POSTGRES_USER: '${DB_USERNAME}'
MYSQL_DATABASE: '${DB_DATABASE}' POSTGRES_PASSWORD: '${DB_PASSWORD}'
MYSQL_USER: '${DB_USERNAME}'
MYSQL_PASSWORD: '${DB_PASSWORD}'
MYSQL_ALLOW_EMPTY_PASSWORD: 1
volumes: volumes:
- 'sail-mysql:/var/lib/mysql' - 'sail-postgresql:/var/lib/postgresql'
- './vendor/laravel/sail/database/mysql/create-testing-database.sh:/docker-entrypoint-initdb.d/10-create-testing-database.sh'
networks: networks:
- sail - sail
healthcheck: healthcheck:
test: test:
- CMD - CMD
- mysqladmin - pg_isready
- ping - -q
- '-p${DB_PASSWORD}' - -d
- '${DB_DATABASE}'
- '-U'
- '${DB_USERNAME}'
retries: 3 retries: 3
timeout: 5s timeout: 5s
redis: redis:
@ -104,7 +103,7 @@ networks:
sail: sail:
driver: bridge driver: bridge
volumes: volumes:
sail-mysql: sail-postgresql:
driver: local driver: local
sail-redis: sail-redis:
driver: local driver: local