-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
62 lines (60 loc) · 1.66 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
61
62
version: '3.7'
services:
# Laravel application
laravel_php_fpm:
build: ./php-fpm
container_name: vhdm_laravel_php_fpm
restart: always
tty: true
volumes:
- "./laravel:/var/www/laravel"
links:
- "laravel_database"
depends_on:
- "laravel_database"
environment:
SERVICE_NAME: laravel_php_fpm
SERVICE_TAGS: dev
DB_PORT: ${DB_PORT}
DB_HOST: ${DB_HOST}
networks:
- vhdm_network
# Webserver
nginx:
build: ./nginx
container_name: vhdm_laravel_nginx
ports:
- '${APP_PORT:-80}:80'
- '${APP_SSL_PORT:-443}:443'
links:
- laravel_php_fpm
volumes:
- ./logs/nginx/:/var/log/nginx
- ./laravel:/var/www/laravel
restart: unless-stopped
depends_on:
- laravel_php_fpm
networks:
- vhdm_network
# The Database
laravel_database:
image: mysql:latest
container_name: vhdm_laravel_mysql
volumes:
- "./database:/docker-entrypoint-initdb.d"
- "./database/dbdata:/var/lib/mysql"
environment:
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
MYSQL_DATABASE: '${DB_DATABASE}'
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
ports:
- '${FORWARD_DB_PORT:-3306}:3306'
restart: always
healthcheck:
test: ["CMD", "mysqladmin", "ping"]
networks:
- vhdm_network
networks:
vhdm_network:
name: vhdm_network
driver: bridge