forked from cbouvat/docker-laravel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-production.yml
54 lines (54 loc) · 1.14 KB
/
docker-compose-production.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
services:
http:
image: nginx:1.20
restart: always
ports:
- '80:80'
volumes:
- './:/app/'
- './docker/nginx/nginx.conf:/etc/nginx/nginx.conf'
depends_on:
- php
networks:
- laravel
php:
build:
context: ./docker/php/
dockerfile: Dockerfile-production
args:
WWWUSER: 'laravel'
WWWUID: '1000'
restart: always
volumes:
- '.:/app/'
networks:
- laravel
depends_on:
- pgsql
node:
image: node:16
volumes:
- './:/app/'
working_dir: '/app/'
pgsql:
image: postgres:14
restart: always
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}" ]
networks:
laravel:
driver: bridge
volumes:
pgsql:
driver: local