-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (60 loc) · 1.56 KB
/
docker-compose.yml
File metadata and controls
64 lines (60 loc) · 1.56 KB
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
63
64
version: '3'
services:
#PHP Service
app:
build:
context: ./laravel
dockerfile: Dockerfile
image: ${DOCKER_IMAGE_NAME}
container_name: ${CONTAINER_NAME}_app
restart: unless-stopped
tty: true
working_dir: /var/www
volumes:
# Main folder
- ./laravel:/var/www
# Symbolic link with storage
- ./laravel/storage/app/public:/var/www/public/storage
- ./php/local.ini:/usr/local/etc/php/conf.d/local.ini
networks:
- app-network
# Nginx Service
webserver:
image: nginx:alpine
container_name: ${CONTAINER_NAME}_webserver
restart: unless-stopped
tty: true
ports:
- ${HOST_HTTP_PORT}:80
- ${HOST_HTTPS_PORT}:443
volumes:
# Main public folder
- ./laravel/public:/var/www/public
# Symbolic link with storage
- ./laravel/storage/app/public:/var/www/public/storage
- ./nginx/conf.d/:/etc/nginx/conf.d/
- ~/docker/nginx_proxy_manager/letsencrypt/:/etc/letsencrypt/
networks:
- app-network
# MySQL Service
mysql:
image: mysql
container_name: ${CONTAINER_NAME}_db
restart: always
ports:
- ${DB_PORT}:3306
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
volumes:
- ./mysql/data:/var/lib/mysql
- ./mysql/conf/my.cnf:/etc/mysql/my.cnf
- ./mysql/mysql-files:/var/lib/mysql-files/
networks:
- app-network
# Docker Networks
networks:
app-network:
driver: bridge