Skip to content

Commit 3e6a75b

Browse files
committed
feat: sail wit Postgres and redis installed
1 parent 5b91b39 commit 3e6a75b

File tree

2 files changed

+74
-1
lines changed

2 files changed

+74
-1
lines changed

docker-compose.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
services:
2+
laravel.test:
3+
build:
4+
context: './vendor/laravel/sail/runtimes/8.4'
5+
dockerfile: Dockerfile
6+
args:
7+
WWWGROUP: '${WWWGROUP}'
8+
image: 'sail-8.4/app'
9+
extra_hosts:
10+
- 'host.docker.internal:host-gateway'
11+
ports:
12+
- '${APP_PORT:-80}:80'
13+
- '${VITE_PORT:-5173}:${VITE_PORT:-5173}'
14+
environment:
15+
WWWUSER: '${WWWUSER}'
16+
LARAVEL_SAIL: 1
17+
XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}'
18+
XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}'
19+
IGNITION_LOCAL_SITES_PATH: '${PWD}'
20+
volumes:
21+
- '.:/var/www/html'
22+
networks:
23+
- sail
24+
depends_on:
25+
- pgsql
26+
- redis
27+
pgsql:
28+
image: 'postgres:17'
29+
ports:
30+
- '${FORWARD_DB_PORT:-5432}:5432'
31+
environment:
32+
PGPASSWORD: '${DB_PASSWORD:-secret}'
33+
POSTGRES_DB: '${DB_DATABASE}'
34+
POSTGRES_USER: '${DB_USERNAME}'
35+
POSTGRES_PASSWORD: '${DB_PASSWORD:-secret}'
36+
volumes:
37+
- 'sail-pgsql:/var/lib/postgresql/data'
38+
- './vendor/laravel/sail/database/pgsql/create-testing-database.sql:/docker-entrypoint-initdb.d/10-create-testing-database.sql'
39+
networks:
40+
- sail
41+
healthcheck:
42+
test:
43+
- CMD
44+
- pg_isready
45+
- '-q'
46+
- '-d'
47+
- '${DB_DATABASE}'
48+
- '-U'
49+
- '${DB_USERNAME}'
50+
retries: 3
51+
timeout: 5s
52+
redis:
53+
image: 'redis:alpine'
54+
ports:
55+
- '${FORWARD_REDIS_PORT:-6379}:6379'
56+
volumes:
57+
- 'sail-redis:/data'
58+
networks:
59+
- sail
60+
healthcheck:
61+
test:
62+
- CMD
63+
- redis-cli
64+
- ping
65+
retries: 3
66+
timeout: 5s
67+
networks:
68+
sail:
69+
driver: bridge
70+
volumes:
71+
sail-pgsql:
72+
driver: local
73+
sail-redis:
74+
driver: local

phpunit.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
<env name="APP_MAINTENANCE_DRIVER" value="file"/>
2626
<env name="BCRYPT_ROUNDS" value="4"/>
2727
<env name="CACHE_STORE" value="array"/>
28-
<env name="DB_CONNECTION" value="sqlite"/>
2928
<env name="DB_DATABASE" value=":memory:"/>
3029
<env name="MAIL_MAILER" value="array"/>
3130
<env name="PULSE_ENABLED" value="false"/>

0 commit comments

Comments
 (0)