-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
139 lines (135 loc) · 2.88 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
version: '3'
services:
#
# MySQL
#
mysql:
# cpu_shares: 128
# mem_limit: 512m
restart: unless-stopped
build:
context: ./mysql
args:
- UID=${UID}
- GID=${GID}
- MYSQL_CONTAINER_USER=${MYSQL_CONTAINER_USER}
- MYSQL_CONTAINER_GROUP=${MYSQL_CONTAINER_GROUP}
image: libertempo/mysql
container_name: lt-mysql
expose:
- 3306
networks:
- libertempo
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_CONTAINER_USER=${MYSQL_CONTAINER_USER}
- MYSQL_CONTAINER_GROUP=${MYSQL_CONTAINER_GROUP}
deploy:
resources:
limits:
cpus: '0.5'
memory: 1G
#
# LDAP
#
# Create a mini ldap client container for boostraping data in the server
ldap:
# cpu_shares: 128
# mem_limit: 512m
container_name: lt-ldap
image: libertempo/ldap
build:
context: ./ldap
networks:
- libertempo
expose:
- 389
- 636
environment:
LDAP_DOMAIN: libertempo
LDAP_PASSWORD: admin
deploy:
resources:
limits:
cpus: '0.5'
memory: 1G
#
# Apache
#
httpd:
# cpu_shares: 128
# mem_limit: 512m
restart: unless-stopped
build:
context: ./httpd
args:
- UID=${UID}
- GID=${GID}
- WEB_USER=${WEB_USER}
- WEB_GROUP=${WEB_GROUP}
- APACHE_ROOT_DIR=${APACHE_ROOT_DIR}
image: libertempo/httpd
container_name: lt-httpd
# dns: 8.8.8.8
# dns_opt:
# - use-vc
# - no-tld-query
ports:
- 80:80
volumes:
- ${PATH_WEB}:${APACHE_ROOT_DIR}/htdocs/web
networks:
- libertempo
environment:
- APACHE_EXPOSED_PORT=${APACHE_EXPOSED_PORT}
- APACHE_ROOT_DIR=${APACHE_ROOT_DIR}
- PHP_APP_DIR=${PHP_APP_DIR}
- WEB_USER=${WEB_USER}
- WEB_GROUP=${WEB_GROUP}
deploy:
resources:
limits:
cpus: '0.5'
memory: 50M
#
# PHP
#
php:
# cpu_shares: 128
# mem_limit: 512m
restart: unless-stopped
build:
context: ./php
args:
- UID=${UID}
- GID=${GID}
- WEB_USER=${WEB_USER}
- WEB_GROUP=${WEB_GROUP}
- PHP_ROOT_DIR=${PHP_ROOT_DIR}
- PHP_APP_DIR=${PHP_APP_DIR}
image: libertempo/php
container_name: lt-php
dns: 8.8.8.8
# dns_opt:
# - use-vc
# - no-tld-query
depends_on:
- mysql
- ldap
- httpd
networks:
- libertempo
volumes:
- ${PATH_WEB}:${PHP_APP_DIR}/web
- ${PATH_API}:${PHP_APP_DIR}/api
environment:
- PHP_ROOT_DIR=${PHP_ROOT_DIR}
- WEB_USER=${WEB_USER}
- WEB_GROUP=${WEB_GROUP}
deploy:
resources:
limits:
cpus: '0.5'
memory: 150M
networks:
libertempo: