-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
39 lines (39 loc) · 1.14 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
version: '3'
services:
laravel:
build:
context: .
dockerfile: Dockerfile.dev
ports:
- '${APP_PORT:-80}:8000'
command: sh -c "composer install && php artisan serve --host=0.0.0.0"
volumes:
- '.:/var/www/html'
networks:
- john-task-list
depends_on:
- pgsql
pgsql:
image: 'postgres:13'
ports:
- '${FORWARD_DB_PORT:-5432}:5432'
environment:
PGPASSWORD: '${DB_PASSWORD:-secret}'
POSTGRES_DB: '${DB_DATABASE}'
POSTGRES_USER: '${DB_USERNAME}'
POSTGRES_PASSWORD: '${DB_PASSWORD:-secret}'
volumes:
- 'pgsql:/var/lib/postgresql/data'
- './create-testing-database.sql:/docker-entrypoint-initdb.d/create-testing-database.sql'
networks:
- john-task-list
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "${DB_DATABASE}", "-U", "${DB_USERNAME}" ]
retries: 3
timeout: 5s
networks:
john-task-list:
driver: bridge
volumes:
pgsql:
driver: local