Apache Tomcat proxied via Nginx

Tomcat support added. JSP and other filetypes now proxy through the Tomcat docker container. Also named each container so direct named access is possible.
This commit is contained in:
Marwolf
2018-07-26 23:23:12 -04:00
parent 0aed3a789b
commit d3172b4663
14 changed files with 5655 additions and 11 deletions

View File

@@ -1,7 +1,9 @@
version: '3'
services:
web:
image: nginx:alpine
container_name: nginx
volumes:
- "./etc/nginx/default.conf:/etc/nginx/conf.d/default.conf"
- "./etc/ssl:/etc/ssl"
@@ -15,6 +17,9 @@ services:
- NGINX_HOST=${NGINX_HOST}
command: /bin/sh -c "envsubst '$$NGINX_HOST' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
restart: always
depends_on:
- php
- mysqldb
# logging:
# driver: splunk
# options:
@@ -23,11 +28,10 @@ services:
# splunk-insecureskipverify: "true"
# tag: "{{.ImageName}}/{{.Name}}/{{.ID}}"
# labels: "Nginx"
depends_on:
- php
- mysqldb
php:
image: nanoninja/php-fpm:${PHP_VERSION}
container_name: php
restart: always
volumes:
- "./etc/php/php.ini:/usr/local/etc/php/conf.d/php.ini"
@@ -40,6 +44,7 @@ services:
# splunk-insecureskipverify: "true"
# tag: "{{.ImageName}}/{{.Name}}/{{.ID}}"
# labels: "PHP"
myadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
@@ -59,8 +64,10 @@ services:
# splunk-insecureskipverify: "true"
# tag: "{{.ImageName}}/{{.Name}}/{{.ID}}"
# labels: "PHPMyAdmin"
mysqldb:
image: mariadb:${MARIADB_VERSION}
container_name: mysql
container_name: ${MYSQL_HOST}
restart: always
env_file:
@@ -83,3 +90,24 @@ services:
# splunk-insecureskipverify: "true"
# tag: "{{.ImageName}}/{{.Name}}/{{.ID}}"
# labels: "MySQL"
tomcat:
image: tomcat:9.0.10-jre10-slim
container_name: tomcat
ports:
- "8082:8082"
- "8443:8443"
restart: always
volumes:
- "./Website:/usr/local/tomcat/webapps/ROOT"
- "./etc/tomcat:/usr/local/tomcat/conf"
depends_on:
- mysqldb
# logging:
# driver: splunk
# options:
# splunk-token: "e1c56fa1-9f7c-4d2c-ba8f-989b15d85008"
# splunk-url: "https://127.0.0.1:8088"
# splunk-insecureskipverify: "true"
# tag: "{{.ImageName}}/{{.Name}}/{{.ID}}"
# labels: "Tomcat"