-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
57 lines (51 loc) · 1.51 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
version: "3"
services:
mysql:
image: mariadb
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_DATABASE: sspanel
MYSQL_USER: ss
MYSQL_PASSWORD: pass
ports:
- 13306:3306/tcp
volumes:
- ./mariadb/db.sql:/docker-entrypoint-initdb.d/db.sql
redis:
image: redis:3-alpine
ssr:
build: shadowsocksr
network_mode: host
volumes:
- ./shadowsocksr/user-config.json:/opt/shadowsocksr-manyuser/user-config.json
- ./shadowsocksr/userapiconfig.py:/opt/shadowsocksr-manyuser/userapiconfig.py
- ./shadowsocksr/usermysql.json:/opt/shadowsocksr-manyuser/usermysql.json
command: -s 0.0.0.0 -m aes-256-cfb -o tls1.2_ticket_auth_compatible -O auth_sha1_v2_compatible
depends_on:
- mysql
php:
build: ss-panel
volumes:
- ssp-volume:/var/www/html
- ./ss-panel/env.template:/var/www/html/env.template
command: /bin/sh -c "envsubst '$$BASE_URL' < /var/www/html/env.template > /var/www/html/.env && php-fpm"
environment:
BASE_URL: ${BASE_URL}
links:
- mysql
- redis
nginx:
image: nginx:1.11.9-alpine
volumes:
- ssp-volume:/var/www/html
- ./nginx/default.template:/etc/nginx/conf.d/default.template
ports:
- "80:80"
environment:
- NGINX_HOST=_
- NGINX_PORT=80
command: /bin/sh -c "envsubst '$$NGINX_HOST $$NGINX_PORT' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
links:
- php
volumes:
ssp-volume: