This repository has been archived by the owner on Sep 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
90 lines (84 loc) · 2.54 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
version: "3.8"
services:
# nginx
nginx-service:
build:
context: docker/nginx
dockerfile: Dockerfile
container_name: p4-webserver
ports:
- "80:80"
- "443:443"
volumes:
- ./project:/var/www/html
- ./project/storage/logs/nginx:/var/log/nginx:delegated
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:cached
- ./docker/nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf:cached
- ./docker/nginx/conf.d/gzip.conf:/etc/nginx/conf.d/gzip.conf:cached
- ./docker/nginx/certs:/etc/ssl/certs:cached
- ./docker/nginx/sites-enabled:/etc/nginx/sites-enabled:cached
- ./docker/nginx/snippets:/etc/nginx/snippets:cached
- ./docker/nginx/templates:/etc/nginx/templates:cached
env_file:
- .nginx.env
depends_on:
- app-service
- composer-service
- mariadb-service
networks:
- backend
# php
app-service:
build:
context: docker
dockerfile: php/Dockerfile
container_name: p4-app
env_file:
- .php.env
ports:
- "9000:9000"
- "8000:8000" # phalcon webtools as a php webserver
volumes:
- ./project:/var/www/html:cached
- ~/composer:/root/.composer
networks:
- backend
# composer
composer-service:
image: composer/composer:latest
container_name: p4-composer
volumes:
- ./project:/app
working_dir: /app
command: install --ignore-platform-reqs --no-scripts
networks:
- backend
# mysql (mariadb)
mariadb-service:
image: mariadb:latest
container_name: p4-mariadb
ports:
- "3307:3306"
volumes:
- ./docker/mysql/cnf:/etc/mysql/conf.d
- ./docker/mysql/database:/var/lib/mysql
- ./docker/mysql/dump.sql:/docker-entrypoint-initdb.d/dump.sql
restart: always
env_file:
- .sql.env
networks:
- backend
# mailhog
# frontend: http://localhost:8025
# api: http://localhost:8025/api/v2/messages (json response)
mailhog-service:
image: mailhog/mailhog:latest
container_name: p4-mailhog
restart: unless-stopped
ports:
- "1025:1025"
- "8025:8025"
networks:
- backend
networks:
backend: