-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
140 lines (130 loc) · 3.38 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
version: "3"
networks:
virtual-net:
services:
db:
build:
context: ./docker
dockerfile: images/database.dockerfile
image: $COMPOSE_PROJECT_NAME:mariadb
container_name: $COMPOSE_PROJECT_NAME-db
restart: unless-stopped
tty: true
volumes:
- $STORAGE_DIRECTORY/database/mariadb/data:/var/lib/mysql
- $STORAGE_DIRECTORY/database/mariadb/init:/docker-entrypoint-initdb.d
#ports:
# - "3306:3306"
environment:
MYSQL_DATABASE: $COMPOSE_PROJECT_NAME
MYSQL_USER: $COMPOSE_PROJECT_NAME
MYSQL_PASSWORD: $COMPOSE_PROJECT_NAME
MYSQL_ROOT_PASSWORD: toor
SERVICE_TAGS: dev
SERVICE_NAME: mysql
networks:
- virtual-net
# mailhog:
# build:
# context: ./docker
# dockerfile: images/mailhog.dockerfile
# image: $COMPOSE_PROJECT_NAME:mailhog
# container_name: $COMPOSE_PROJECT_NAME-mailhog
# restart: "no"
# volumes:
# - $STORAGE_DIRECTORY/mailhog:/maildir
# command: ["-storage=maildir", "-maildir-path=/maildir"]
# ports:
# - 1025:1025
# - 8025:8025
# networks:
# - virtual-net
# redis:
# build:
# context: ./docker
# dockerfile: images/redis.dockerfile
# image: $COMPOSE_PROJECT_NAME:redis
# container_name: $COMPOSE_PROJECT_NAME-redis
# restart: "no"
# command: redis-server --appendonly yes --requirepass "toor"
# ports:
# - "9987:9987"
# networks:
# - virtual-net
php: &php8
build:
context: ./docker
dockerfile: images/php.dockerfile
image: $COMPOSE_PROJECT_NAME:php
container_name: $COMPOSE_PROJECT_NAME-php
restart: "no"
environment:
COMPOSER_MEMORY_LIMIT: -1
volumes:
- $APP_CODE:/var/www/html
- $PHP_STATUS/status.conf:/usr/local/etc/php-fpm.d/www.conf
working_dir: /var/www/html
depends_on:
# - redis
# - mailhog
- db
#ports:
# - "9080:9000"
networks:
- virtual-net
nginx:
build:
context: ./docker
dockerfile: images/nginx.dockerfile
image: $COMPOSE_PROJECT_NAME:nginx
container_name: $COMPOSE_PROJECT_NAME-nginx
restart: "no"
ports:
- "8000:80"
- "8443:443"
volumes:
- $APP_CODE:/var/www/html
- $NGINX_CONFIG/nginx.conf:/etc/nginx/nginx.conf
- $NGINX_CONFIG/modules:/etc/nginx/modules
- $NGINX_CONFIG/conf.d:/etc/nginx/conf.d
- $NGINX_CONFIG/default.d:/etc/nginx/default.d
- $NGINX_CONFIG/servers.d:/etc/nginx/servers.d
- $NGINX_CONFIG/locations.d:/etc/nginx/locations.d
- $NGINX_CONFIG/auth:/etc/nginx/auth
- $NGINX_CONFIG/snippets.d:/etc/nginx/snippets.d
- $NGINX_LOGS:/var/log/nginx
working_dir: /var/www/html
depends_on:
- php
- db
networks:
- virtual-net
composer: &composer
<<: *php8
depends_on:
- php
ports: []
entrypoint: ["composer"]
artisan:
<<: *composer
depends_on:
- php
entrypoint: ["php", "/var/www/html/artisan"]
npm: &npm
build:
context: ./docker
dockerfile: images/npm.dockerfile
image: $COMPOSE_PROJECT_NAME:node
container_name: $COMPOSE_PROJECT_NAME-npm
volumes:
- $APP_CODE:/var/www/html
working_dir: /var/www/html
restart: "no"
entrypoint: ["npm"]
networks:
- virtual-net
vue:
<<: *npm
#ports:
# - "8080:8080"
entrypoint: ["npm", "run", "serve"]