-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
141 lines (131 loc) · 2.69 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
version: '3.8'
services:
fpm:
build:
context: .
dockerfile: docker/Dockerfile
target: fpm-dev
container_name: fpm
restart: always
tty: true
volumes:
- .:/var/www
networks:
- app-network
worker:
build:
context: .
dockerfile: docker/Dockerfile
target: fpm-dev
container_name: worker
command: php artisan horizon
restart: always
tty: true
volumes:
- .:/var/www
networks:
- app-network
schedule:
build:
context: .
dockerfile: docker/Dockerfile
target: fpm-dev
container_name: schedule
command: php artisan schedule:work
restart: always
tty: true
volumes:
- .:/var/www
networks:
- app-network
web:
build:
context: .
dockerfile: docker/Dockerfile
target: nginx
container_name: web
restart: always
tty: true
ports:
- "80:80"
- "443:443"
volumes:
- .:/var/www
networks:
- app-network
websockets:
build:
context: .
dockerfile: docker/Dockerfile
target: fpm-dev
container_name: websockets
command: php artisan websockets:serve
restart: always
tty: true
ports:
- "6001:6001"
volumes:
- .:/var/www
networks:
- app-network
node:
build:
context: .
dockerfile: docker/Dockerfile
target: node
container_name: node
command: yarn dev
restart: always
tty: true
extra_hosts:
- 'host.docker.internal:host-gateway'
ports:
- "5173:5173"
volumes:
# the node container only needs access to these resources
# this is also only in the event you are updating these resources
- .env:/var/www/.env
- ./public:/var/www/public
- ./vite.config.js:/var/www/vite.config.js
- ./resources:/var/www/resources
- ./package.json:/var/www/package.json
- node_modules:/var/www/node_modules
networks:
- app-network
pgsql:
image: postgres:14.4-alpine
container_name: pgsql
restart: always
tty: true
ports:
- "5432:5432"
environment:
POSTGRES_USER: localuser
POSTGRES_PASSWORD: supersecretpassword
POSTGRES_DB: laravel
volumes:
- dbdata:/var/lib/postgresql/data
networks:
- app-network
redis:
image: redis:7.0.4
container_name: redis
restart: always
tty: true
ports:
- "6379:6379"
command: redis-server --save 20 1 --loglevel warning
volumes:
- cache:/data
networks:
- app-network
networks:
app-network:
driver: bridge
volumes:
dbdata:
driver: local
cache:
driver: local
node_modules:
driver: local