-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
68 lines (67 loc) · 1.75 KB
/
docker-compose.yaml
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
version: '3.4'
services:
web:
container_name: web
image: nginx:latest
depends_on:
- php
- db
domainname: "sfcollection.local"
networks:
mynet:
aliases:
- web.sfcollection.local
volumes:
- ./docker/nginx/site.template:/etc/nginx/conf.d/site.template
- .:/app:cached
command: >
/bin/bash -c
"envsubst '$$NGINX_HOST $$NGINX_PORT $$NGINX_ROOT'
< /etc/nginx/conf.d/site.template
> /etc/nginx/conf.d/default.conf
&& exec nginx -g 'daemon off;'"
ports:
- "8080:80"
environment:
NGINX_HOST: "sfcollection.local"
NGINX_PORT: 80
NGINX_ROOT: "/app/public"
php:
build:
context: ./docker/php
args:
- PHP_VERSION=7.2
depends_on:
- db
links:
- db
networks:
mynet:
aliases:
- php.sfcollection.local
volumes:
- ./:/app:rw
- ./docker/php/php.ini:/usr/local/etc/php/php.ini
restart: always
db:
image: mariadb:latest
restart: always
volumes:
- mariadb:/var/lib/mysql:rw
- ./docker/mariadb:/etc/mysql/conf.d
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: sfcollection
MYSQL_USER: sfcollection
MYSQL_PASSWORD: sfcollection
networks:
mynet:
aliases:
- db.sfcollection.local
networks:
mynet:
volumes:
mariadb:
cache: