forked from cbouvat/docker-laravel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
70 lines (70 loc) · 1.5 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
services:
http:
image: nginx:1.20
ports:
- '80:80'
volumes:
- './:/app/'
- './docker/nginx/nginx.conf:/etc/nginx/nginx.conf'
depends_on:
- php
networks:
- laravel
php:
build:
context: ./docker/php/
args:
WWWUSER: 'laravel'
WWWUID: '1000'
volumes:
- '.:/app/'
extra_hosts:
- 'host.docker.internal:host-gateway'
networks:
- laravel
depends_on:
- pgsql
adminer:
image: adminer
ports:
- 8080:8080
networks:
- laravel
environment:
ADMINER_DEFAULT_SERVER: 'pgsql'
ADMINER_DEFAULT_TYPE: 'postgresql'
depends_on:
- pgsql
node:
image: node:16
volumes:
- './:/app/'
working_dir: '/app/'
pgsql:
image: postgres:14
ports:
- '${FORWARD_DB_PORT:-5432}:5432'
environment:
PGPASSWORD: '${DB_PASSWORD:-secret}'
POSTGRES_DB: '${DB_DATABASE:-laravel}'
POSTGRES_USER: '${DB_USERNAME:-laravel}'
POSTGRES_PASSWORD: '${DB_PASSWORD:-secret}'
volumes:
- 'pgsql:/var/lib/postgresql/data'
networks:
- laravel
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "${DB_DATABASE:-laravel}", "-U", "${DB_USERNAME:-laravel}" ]
mailhog:
image: 'mailhog/mailhog:latest'
ports:
- '${FORWARD_MAILHOG_PORT:-1025}:1025'
- '${FORWARD_MAILHOG_DASHBOARD_PORT:-8025}:8025'
networks:
- laravel
networks:
laravel:
driver: bridge
volumes:
pgsql:
driver: local