-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
61 lines (57 loc) · 1.34 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
version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
image: aml-steadfast-collective-voting-system
container_name: aml-steadfast-collective-voting-system
restart: unless-stopped
tty: true
ports:
- "8000:8000"
- "5173:5173"
volumes:
- ./:/var/www
- /var/www/vendor
- /var/www/node_modules
environment:
DB_CONNECTION: mysql
DB_HOST: db
DB_PORT: 3306
DB_DATABASE: aml_steadfast_collective
DB_USERNAME: user
DB_PASSWORD: password
networks:
- laravel
command: >
/bin/sh -c "/wait-for-db.sh db &&
/start.sh &&
composer install &&
cp .env.example .env &&
npm install &&
npm run build &&
php artisan key:generate &&
php artisan migrate --seed &&
php artisan serve --host=0.0.0.0 --port=8000"
db:
image: mysql:8.0
container_name: aml_mysql_db
restart: unless-stopped
environment:
MYSQL_DATABASE: aml_steadfast_collective
MYSQL_USER: user
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: password
ports:
- "3306:3306"
volumes:
- dbdata:/var/lib/mysql
networks:
- laravel
volumes:
dbdata:
driver: local
networks:
laravel:
driver: bridge