-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
45 lines (43 loc) · 1.31 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
version: "3.9"
services:
app:
build:
context: .
dockerfile: ./docker/app/Dockerfile
container_name: app_${APP_NAME}
# restart: unless-stopped
# tty: true
command: >
sh -c
'mkdir -p storage/framework/sessions storage/framework/views storage/framework/cache storage/logs bootstrap/cache \
&& chmod -R 777 storage bootstrap/cache storage \
&& composer update -o --no-interaction \
&& composer dump-autoload -o \
&& php artisan optimize \
&& php artisan event:cache \
&& php artisan config:cache \
&& php artisan route:cache \
&& php artisan view:cache \
&& vendor/bin/pint \
&& npm install \
&& php artisan octane:start --server=swoole --host=0.0.0.0 --port=9000 --watch'
ports:
- "${APP_PORT}:9000"
volumes:
- ./app/:/var/www/html/
- ./docker/app/php.ini:/usr/local/etc/php/conf.d/php.ini
vite-dev-server:
image: laravel-inertia-app
container_name: vite-dev-server_${APP_NAME}
restart: unless-stopped
tty: true
command: >
sh -c
'npm run dev'
ports:
- "${VITE_DEV_PORT}:5173"
volumes:
- ./app/:/var/www/html/
- ./docker/app/php.ini:/usr/local/etc/php/conf.d/php.ini
depends_on:
- app