First commit of my docker env

This commit is contained in:
root 2020-12-08 08:59:05 -06:00
commit 5852c5fbe1
11 changed files with 327 additions and 0 deletions

12
certbot-renew.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
# docker-compose -f /var/docker/config/haproxy/docker-compose.yml down
#/usr/bin/certbot certonly --force-renewal --standalone -d rs.hamik.net
#/usr/bin/certbot renew
/usr/local/bin/certbot certonly -d *.hamik.net --dns-route53 -m dan@paradizelost.net --agree-tos --non-interactive --server https://acme-v02.api.letsencrypt.org/directory --force-renewal
bash -c 'cat /etc/letsencrypt/live/hamik.net/fullchain.pem /etc/letsencrypt/live/hamik.net/privkey.pem > /var/docker/config/haproxy/data/ssl/hamik.net.pem'
export HOSTNAME=$HOSTNAME
docker kill -s HUP haproxy
#docker-compose -f /var/docker/config/haproxy/docker-compose.yml up -d
#docker-compose -f /var/docker/config/thelounge/docker-compose.yml up -d
#docker-compose -f /var/docker/config/guacamole/docker-compose.yml up -d

View File

@ -0,0 +1,67 @@
version: '3'
services:
guacd:
container_name: guacd
hostname: guacd
image: guacamole/guacd
restart: always
logging:
options:
max-size: "10m"
max-file: "3"
networks:
- xrdp_default
guacamole:
container_name: guacamole
hostname: guacamole
image: guacamole/guacamole
logging:
options:
max-size: "10m"
max-file: "3"
restart: always
networks:
- xrdp_default
volumes:
- ./data/config:/guacamole
#ports:
# - "8080:8080"
environment:
GUACD_HOSTNAME: ${GUACD_HOSTNAME}
GUACAMOLE_HOME: ${GUACAMOLE_HOME}
MYSQL_HOSTNAME: ${MYSQL_HOSTNAME}
MYSQL_PORT: ${MYSQL_PORT}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
LDAP_HOSTNAME: ${LDAP_HOSTNAME}
LDAP_PORT: ${LDAP_PORT}
LDAP_ENCRYPTION_METHOD: ${LDAP_ENCRYPTION_METHOD}
LDAP_USER_BASE_DN: ${LDAP_USER_BASE_DN}
LDAP_SEARCH_BIND_DN: ${LDAP_SEARCH_BIND_DN}
LDAP_SEARCH_BIND_PASSWORD: ${LDAP_SEARCH_BIND_PASSWORD}
LDAP_USERNAME_ATTRIBUTE: ${LDAP_USERNAME_ATTRIBUTE}
DUO_API_HOSTNAME: ${DUO_API_HOSTNAME}
DUO_INTEGRATION_KEY: ${DUO_INTEGRATION_KEY}
DUO_SECRET_KEY: ${DUO_SECRET_KEY}
DUO_APPLICATION_KEY: ${DUO_APPLICATION_KEY}
mariadb:
container_name: guacdb
hostname: guacdb
image: mariadb
restart: always
logging:
options:
max-size: "10m"
max-file: "3"
networks:
- xrdp_default
volumes:
- ./data/db:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
networks:
xrdp_default:
external: true

View File

@ -0,0 +1,69 @@
version: '3'
services:
haproxy:
container_name: haproxy
hostname: haproxy
# image: haproxy:latest
image: haproxy:latest
restart: always
logging:
options:
max-size: "10m"
max-file: "3"
volumes:
- ./data:/etc/haproxy
- ./data:/usr/local/etc/haproxy
ports:
- "443:443"
- "80:80"
- "8081:8080"
environment:
- DOCKER_HOST=${HOSTNAME}
networks:
- guacamole_default
- homeassistant_default
- kanboard_default
- mayanedms_default
- stchart_default
- thelounge_default
- gitlab_default
- xrdp_default
- pihole_default
- openxkpi_default
- grocy_default
- nextcloud_default
- snipeit_default
- teedy_default
- heimdall_default
networks:
nextcloud_default:
external: true
guacamole_default:
external: true
homeassistant_default:
external: true
kanboard_default:
external: true
mayanedms_default:
external: true
stchart_default:
external: true
thelounge_default:
external: true
gitlab_default:
external: true
xrdp_default:
external: true
pihole_default:
external: true
openxkpi_default:
external: true
grocy_default:
external: true
snipeit_default:
external: true
teedy_default:
external: true
heimdall_default:
external: true

View File

@ -0,0 +1,13 @@
version: "2.1"
services:
heimdall:
image: ghcr.io/linuxserver/heimdall
container_name: heimdall
environment:
- PUID=1000
- PGID=1000
- TZ=America/Chicago
volumes:
- ./data/config:/config
restart: unless-stopped

View File

@ -0,0 +1,16 @@
version: '3'
services:
homeassistant:
container_name: home-assistant
image: homeassistant/home-assistant
logging:
options:
max-size: "10m"
max-file: "3"
volumes:
- ./data:/config
- /etc/localtime:/etc/localtime:ro
restart: always
ports:
- 8123:8123
command: bash -c "sed -i -E \"s/_TLSv1/_TLS/g\" `find / -name roomba.py -print` && python3 -m homeassistant --config /config"

View File

@ -0,0 +1,41 @@
version: '2'
volumes:
nextcloud:
db:
services:
db:
container_name: nextclouddb
hostname: nextclouddb
image: mariadb
logging:
options:
max-file: "3"
max-size: "10m"
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- ./data/db:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
app:
image: nextcloud
container_name: nextcloud
hostname: nextcloud
logging:
options:
max-file: "3"
max-size: "10m"
ports:
- 8087:80
links:
- db
volumes:
- ./data/nextcloud:/var/www/html
restart: always

View File

@ -0,0 +1,43 @@
version: '3'
services:
snipeit:
container_name: snipeit
hostname: snipeit
image: snipe/snipe-it
restart: always
logging:
options:
max-file: "3"
max-size: "10m"
# ports:
# - 8089:80
volumes:
- ./data/:/var/lib/snipeit
- /etc/letsencrypt/live/hamik.net/cert.pem:/var/lib/snipeit/ssl/snipeit-ssl.crt
- /etc/letsencrypt/live/hamik.net/privkey.pem:/var/lib/snipeit/ssl/snipeit-ssl.key
environment:
MYSQL_PORT_3306_TCP_ADDR: ${MYSQL_PORT_3306_TCP_ADDR}
MYSQL_PORT: ${MYSQL_PORT}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
APP_ENV: ${APP_ENV}
APP_DEBUG: ${APP_DEBUG}
APP_KEY: ${APP_KEY}
APP_URL: ${APP_URL}
APP_TIMEZONE: ${APP_TIMEZONE}
APP_LOCALE: ${APP_LOCALE}
snipeitdb:
container_name: snipeitdb
hostname: snipeitdb
image: mariadb
logging:
options:
max-file: "3"
max-size: "10m"
restart: always
volumes:
- ./data/db:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}

View File

@ -0,0 +1,36 @@
version: '3'
services:
influx:
container_name: influx
hostname: influx
image: influxdb
logging:
options:
max-size: "10m"
max-file: "3"
restart: always
volumes:
- ./influx:/var/lib/influxdb
ports:
- "8083:8083"
- "8086:8086"
- "2003:2003"
grafana:
container_name: grafana
hostname: grafana
image: grafana/grafana
logging:
options:
max-size: "10m"
max-file: "3"
restart: always
volumes:
- ./grafana/var/lib/grafana:/var/lib/grafana
- ./grafana/etc/grafana/grafana.ini:/etc/grafana/grafana.ini
#ports:
# - "5000:3000"
environment:
# - INSTALL_PLUGINS="http://plugin-domain.com/my-custom-plugin.zip;custom-plugin"
- GF_SERVER_DOMAIN="ststats.hamik.net"

View File

@ -0,0 +1,16 @@
version: '3'
services:
lounge:
container_name: lounge
hostname: lounge
image: thelounge/thelounge
restart: always
logging:
options:
max-size: "10m"
max-file: "3"
volumes:
- ./data:/var/opt/thelounge
# ports:
#- "9000:9000"

2
update-images.sh Normal file
View File

@ -0,0 +1,2 @@
find /var/docker/config -name docker-compose.yml -exec docker-compose -f {} pull \;
find /var/docker/config -name docker-compose.yml -exec docker-compose -f {} up -d --remove-orphans \;

12
xrdp/docker-compose.yml Normal file
View File

@ -0,0 +1,12 @@
version: '2.1'
services:
terminalserver:
image: danielguerra/ubuntu-xrdp
container_name: xrdp
hostname: ltx
restart: always
shm_size: 1g
volumes:
- ./data/:/home/
- ./passwd:/etc/passwd
- ./shadow:/etc/shadow