Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
101 lines (91 sloc) 2.49 KB
#
# tomammon.net resume application
# Service Node docker-compose.yml
#
# This compose file brings up all the necessary containers on a Service Node
# to service the tomammon.net resume web application. See https://github.com/tomammon/tomammonnet/
# for details of the architecture of the application.
#
# NOTE: The following environment variables must be present when the containers
# are instantiated for the first time:
#
# $TANDB_PASSWD
##
## this specifies what the mariadb root user password will be set to when the
## database is first created. Subsequent runs of the container don't need
## this set because the password is stored in the mariadb database itself.
### bash CLI syntax: # export TANDB_PASSWD=yourpasswordhere
version: '3'
services:
slb-haproxy:
image: tomammon/tomammon.net:haproxy-slb
restart: always
container_name: slb-haproxy
ports:
- 80:80
- 1936:1936
volumes:
- /opt/tan/slb-haproxyconfig/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
networks:
default:
backend:
ipv4_address: 192.168.0.2
websrv-a:
image: tomammon/tomammon.net:webserver
restart: always
container_name: websrv-a
volumes:
- /opt/tan/appcode/websrv:/var/www/html
networks:
backend:
ipv4_address: 192.168.0.10
websrv-b:
image: tomammon/tomammon.net:webserver
restart: always
container_name: websrv-b
volumes:
- /opt/tan/appcode/websrv:/var/www/html
networks:
backend:
ipv4_address: 192.168.0.11
appsrv-a:
image: tomammon/tomammon.net:appserver
restart: always
container_name: appsrv-a
volumes:
- /opt/tan/appcode/appsrv:/var/www/html
- /var/phplib:/var/phplib
networks:
backend:
ipv4_address: 192.168.0.100
appsrv-b:
image: tomammon/tomammon.net:appserver
restart: always
container_name: appsrv-b
volumes:
- /opt/tan/appcode/appsrv:/var/www/html
- /var/phplib:/var/phplib
networks:
backend:
ipv4_address: 192.168.0.101
database:
image: mariadb:10.0.33
restart: always
container_name: tandb_slave
environment:
MYSQL_ROOT_PASSWORD: ${TANDB_PASSWD}
volumes:
- /opt/tan/dbdata:/var/lib/mysql
- /opt/tan/dbconfig:/etc/mysql/conf.d
command: [mysqld, --server_id=2]
networks:
default:
backend:
ipv4_address: 192.168.0.200
networks:
backend:
driver: bridge
ipam:
driver: default
config:
- subnet: 192.168.0.0/24