generated from specialtactics/laravel-api-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
91 lines (83 loc) · 2.28 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
version: '3.7'
services:
# Workspace Container
workspace:
container_name: your_project_workspace
build:
context: ./env/docker/workspace
args:
- PHP_VERSION=${PHP_VERSION}
- PHP_XDEBUG_ENABLE=${PHP_XDEBUG_ENABLE}
- PHP_XDEBUG_VERSION=${PHP_XDEBUG_VERSION}
- PHP_XDEBUG_REMOTE_CONNECT_BACK=${PHP_XDEBUG_REMOTE_CONNECT_BACK}
- COMPOSER_PROCESS_TIMEOUT=${COMPOSER_PROCESS_TIMEOUT}
volumes:
- ./:/var/www:cached
- ~/.ssh:/home/laradock/.ssh
- ~/.gitconfig:/home/laradock/.gitconfig
- ~/.config/composer:/home/laradock/.config/composer
- ~/.aws:/home/laradock/.aws
tty: true
networks:
- your_project_network
# PHP-FPM
php-fpm:
container_name: your_project_php_fpm
build:
context: ./env/docker/php-fpm
args:
- PHP_VERSION=${PHP_VERSION}
- PHP_XDEBUG_ENABLE=${PHP_XDEBUG_ENABLE}
- PHP_XDEBUG_VERSION=${PHP_XDEBUG_VERSION}
- PHP_XDEBUG_REMOTE_CONNECT_BACK=${PHP_XDEBUG_REMOTE_CONNECT_BACK}
volumes:
- ./:/var/www:cached
depends_on:
- workspace
networks:
- your_project_network
# NGINX
nginx:
container_name: your_project_nginx
build:
context: ./env/docker/nginx
volumes:
- ./:/var/www:cached
- ${NGINX_HOST_LOG_PATH}:/var/log/nginx
depends_on:
- php-fpm
- postgres
environment:
- HTTPS_METHOD=${HTTPS_METHOD}
ports:
- 80:80
networks:
- your_project_network
# PostgreSQL
postgres:
container_name: your_project_postgres
build:
context: ./env/docker/postgres
volumes:
- ${DATA_PATH_HOST}postgres:/var/lib/postgresql/data
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
networks:
- your_project_network
# Redis
redis:
container_name: your_project_redis
image: "redis"
hostname: your_project_redis
networks:
- your_project_network
# Volumes configuration
volumes:
postgres:
driver: "local"
# Network configuration
networks:
your_project_network:
name: your_project_network