forked from range-of-motion/budget
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
38 lines (34 loc) · 887 Bytes
/
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
version: '3'
volumes:
database2: {}
built_app: {}
services:
# Named "database2" because "database" conflicts with directory inside project
database2:
image: mysql:8
environment:
MYSQL_DATABASE: budget
MYSQL_USER: budget
MYSQL_PASSWORD: test
MYSQL_RANDOM_ROOT_PASSWORD: 'true'
command: --default-authentication-plugin=mysql_native_password
volumes:
- database2:/var/lib/mysql
php:
build: ./
environment:
DB_HOST: database2
DB_DATABASE: budget
DB_USERNAME: budget
DB_PASSWORD: test
volumes:
- built_app:/usr/share/nginx/budget
nginx:
image: nginx:latest
depends_on:
- php # To ensure that "built_app" volume gets filled by "php" service
volumes:
- built_app:/usr/share/nginx/budget
- ./nginx.conf:/etc/nginx/conf.d/default.conf
ports:
- 8080:80