forked from 123inkt/123view
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
114 lines (106 loc) · 3.5 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
version: '3'
services:
nginx:
container_name: ${NGINX_CONTAINER:-nginx}
build:
args:
VERSION: $NGINX_VERSION
context: .
dockerfile: ./docker/nginx/Dockerfile
ports:
- ${NGINX_PORT:-8080}:80
- ${NGINX_SSL_PORT:-8443}:443
volumes:
- ./public:/app/public
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
- ./docker/nginx/error/500.html:/usr/share/nginx/html/500.html:ro
- ./docker/nginx/error/502.html:/usr/share/nginx/html/502.html:ro
- ./docker/nginx/error/503.html:/usr/share/nginx/html/503.html:ro
- ./docker/nginx/error/504.html:/usr/share/nginx/html/504.html:ro
depends_on:
- php-fpm
php-fpm:
container_name: ${PHP_CONTAINER:-php-fpm}
build:
args:
VERSION: $PHP_VERSION
context: .
dockerfile: ./docker/php-fpm/Dockerfile
environment:
PHP_MEMORY_LIMIT: $PHP_MEMORY_LIMIT
HOME: /home/123view
depends_on:
mysql:
condition: service_healthy
rabbitmq:
condition: service_healthy
nodejs:
condition: service_started
mail:
condition: service_started
volumes:
- .:/app:rw
mysql:
container_name: ${MYSQL_CONTAINER:-mysql}
build:
args:
VERSION: $MYSQL_VERSION
context: ./docker/mysql
cap_add:
- SYS_NICE # CAP_SYS_NICE
ports:
- ${MYSQL_PORT:-3306}:3306
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
timeout: 20s
retries: 10
volumes:
- ${MYSQL_DATA_DIR}:/var/lib/mysql
rabbitmq:
container_name: ${RABBITMQ_CONTAINER:-rabbitmq}
image: bitnami/rabbitmq:latest
healthcheck:
test: rabbitmq-diagnostics check_port_connectivity
interval: 1s
timeout: 5s
retries: 30
mail:
container_name: ${MAIL_CONTAINER:-mail}
image: bytemark/smtp
environment:
RELAY_HOST: ${SMTP_RELAY_HOST}
nodejs:
container_name: ${NODEJS_CONTAINER:-nodejs}
build:
context: .
dockerfile: ./docker/nodejs/Dockerfile
environment:
NODEJS_HOST: ${HIGHLIGHTJS_HOST}
NODEJS_PORT: ${HIGHLIGHTJS_PORT}
volumes:
- .:/app:rw
mercure:
container_name: ${MERCURE_CONTAINER:-mercure}
image: dunglas/mercure:${MERCURE_VERSION}
environment:
GLOBAL_OPTIONS: |
auto_https off
http_port 6080
https_port 6443
SERVER_NAME: |
${APP_HOSTNAME}, mercure, localhost
tls /etc/ssl/certs/123view-cert.crt /etc/ssl/private/123view-cert.key
MERCURE_PUBLISHER_JWT_KEY: ${MERCURE_JWT_SECRET}
MERCURE_SUBSCRIBER_JWT_KEY: ${MERCURE_JWT_SECRET}
MERCURE_EXTRA_DIRECTIVES: |
cors_origins https://${APP_HOSTNAME}:${NGINX_SSL_PORT} https://${APP_HOSTNAME}
ports:
- ${MERCURE_SSL_PORT:-6443}:6443
networks:
default:
name: 123view-network
driver: bridge
ipam:
driver: default
config:
- subnet: ${DOCKER_SUBNET}