-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
60 lines (55 loc) · 1.58 KB
/
docker-compose.yaml
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
services:
app:
container_name: directorylister-app
build: .
image: phlak/directorylister-site:dev
depends_on: [mysql, redis]
ports:
- ${APP_PORT:-80}:80
extra_hosts:
- directorylister.local:127.0.0.1
user: ${HOST_USER_ID:-0}:${HOST_GROUP_ID:-0}
volumes:
- ./:/var/www/html
- ./.docker/php/config/php.ini:/usr/local/etc/php/php.ini
- ./.docker/apache2/config/000-default.conf:/etc/apache2/sites-available/000-default.conf
mysql:
container_name: directorylister-mysql
image: mysql:8.0
ports:
- ${DB_PORT:-3306}:3306
environment:
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_DATABASE: app
MYSQL_USER: laravel
MYSQL_PASSWORD: secret
volumes:
- mysql-data:/var/lib/mysql
redis:
container_name: directorylister-redis
image: redis:6.0
ports:
- ${REDIS_PORT:-6379}:6379
npm:
container_name: directorylister-npm
image: phlak/directorylister-site:dev
volumes:
- ./:/var/www/html
ports:
- ${APP_PORT:-5173}:5173
user: ${HOST_USER_ID:-0}:${HOST_GROUP_ID:-0}
command: npm run dev
artisan:
container_name: directorylister-artisan
image: phlak/directorylister-site:dev
entrypoint: php artisan
depends_on: [mysql, redis]
profiles: [artisan]
volumes:
- ./:/var/www/html
- ./.docker/php/config/php.ini:/usr/local/etc/php/php.ini
- ./.docker/apache2/config/000-default.conf:/etc/apache2/sites-available/000-default.conf
user: ${HOST_USER_ID:-0}:${HOST_GROUP_ID:-0}
volumes:
mysql-data:
driver: local