-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
51 lines (46 loc) · 1009 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
39
40
41
42
43
44
45
46
47
48
49
50
51
version: "2"
services:
# The Application
app:
build:
context: .
dockerfile: Dockerfile
image: roerjo/php-todo-app
container_name: php-todo-app
working_dir: /var/www/app
expose:
- 9000
links:
- database
# The Web Server
nginx:
image: nginx:alpine
container_name: php-todo-nginx
expose:
- 80
volumes:
- ./vhost.conf:/etc/nginx/conf.d/default.conf
- .:/var/www/app
links:
- app
environment:
- "VIRTUAL_HOST=${APP_HOST}"
- "LETSENCRYPT_HOST=${APP_HOST}"
- "LETSENCRYPT_EMAIL=${APP_EMAIL}"
# The Local Database
database:
image: mysql:5.7
container_name: php-todo-database
volumes:
- php_todo_database:/var/lib/mysql
environment:
- "MYSQL_DATABASE=${DATABASE_DATABASE}"
- "MYSQL_ROOT_PASSWORD=${DATABASE_PASSWORD}"
ports:
- "${EXTERNAL_DB_PORT}:3306"
volumes:
php_todo_database:
networks:
default:
external:
name: nginx-proxy