-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
48 lines (45 loc) · 1.08 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
version: '3'
services:
# Application
app:
build:
context: ./docker/dev
dockerfile: app.dockerfile
working_dir: /var/www
depends_on:
- database
- web
volumes:
- ./:/var/www
environment:
- 'DB_PORT=3306'
- 'DB_HOST=database'
restart: on-failure
# Web Server
web:
build:
context: ./docker/dev
dockerfile: web.dockerfile
working_dir: /var/www
volumes:
- ./:/var/www
ports:
- 8080:80
restart: on-failure
# Database
database:
build:
context: ./docker/dev
dockerfile: database.dockerfile
volumes:
- dbdata:/var/lib/mysql
environment:
- 'MYSQL_DATABASE=db_database'
- 'MYSQL_USER=db_username'
- 'MYSQL_PASSWORD=db_password'
- 'MYSQL_ROOT_PASSWORD=db_rootpassword'
ports:
- 33061:3306
restart: on-failure
volumes:
dbdata: