forked from symfony/symfony-standard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
58 lines (54 loc) · 1.23 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
version: '3'
services:
mysql:
image: mariadb
container_name: mysql.{projectname}.app
stdin_open: true
tty: true
networks:
- global
env_file:
- ./docker/mysql/config.env
volumes:
- ~/data/mysql.{projectname}.app:/var/lib/mysql
restart: always
php:
image: amsdard.io/{projectname}/php:1.0
container_name: php.{projectname}.app
build:
context: ./
dockerfile: ./docker/php/Dockerfile
networks:
- global
stdin_open: true
tty: true
env_file:
- ./docker/php/config.env
volumes:
- ./:/opt
- ~/.ssh:/var/www/.ssh:cached
- ~/.docker-composer:/var/www/.composer:cached
links:
- mysql
restart: always
nginx:
image: amsdard.io/{projectname}/nginx:1.0
container_name: nginx.{projectname}.app
build:
context: ./
dockerfile: ./docker/nginx/Dockerfile
networks:
- global
stdin_open: true
tty: true
labels:
traefik.frontend.rule: "Host:{subdomain}.{projectname}.app,{projectname}.app"
volumes:
- ./web:/opt/web:cached
- ./docker/nginx/:/etc/nginx/conf.d:cached
links:
- php
restart: always
networks:
global:
external: true