(simatec) network added

This commit is contained in:
simatec 2024-06-13 13:10:48 +02:00
parent 1ea8a7ee35
commit 62e1a09ed9
3 changed files with 40 additions and 15 deletions

View file

@ -1,10 +1,10 @@
version: "3"
services:
mysql:
image: mariadb:${MARIA_DB_VERSION}
container_name: mysql_piler
restart: unless-stopped
networks:
- pilernet
cap_drop:
- ALL
cap_add:
@ -17,7 +17,7 @@ services:
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_RANDOM_ROOT_PASSWORD=yes
- TZ="Europe/Berlin"
- MARIADB_AUTO_UPGRADE=TRUE
#- MARIADB_AUTO_UPGRADE=TRUE
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
healthcheck:
test: mysql --user=${MYSQL_USER} --password=${MYSQL_PASSWORD} piler --execute "show tables"
@ -32,6 +32,8 @@ services:
image: memcached:latest
container_name: memcached_piler
restart: unless-stopped
networks:
- pilernet
cap_drop:
- ALL
command: -m 64
@ -40,6 +42,8 @@ services:
image: simatec/piler:${PILER_VERSION}
container_name: piler
restart: unless-stopped
networks:
- pilernet
hostname: ${PILER_DOMAIN}
init: true
environment:
@ -77,8 +81,12 @@ services:
limits:
memory: 512M
depends_on:
- "memcached"
- "mysql"
- memcached
- mysql
networks:
pilernet:
external: true
volumes:
db_data:

View file

@ -1,9 +1,10 @@
version: "3"
services:
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
restart: always
restart: unless-stopped
networks:
- pilernet
ports:
- "80:80"
- "443:443"
@ -12,20 +13,26 @@ services:
- ./nginx-data/vhost.d:/etc/nginx/vhost.d
- ./nginx-data/html:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
nginx-letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: nginx-letsencrypt
restart: always
restart: unless-stopped
networks:
- pilernet
volumes_from:
- nginx-proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- DEFAULT_EMAIL=${LETSENCRYPT_EMAIL}
mysql:
image: mariadb:${MARIA_DB_VERSION}
container_name: mysql_piler
restart: unless-stopped
networks:
- pilernet
cap_drop:
- ALL
cap_add:
@ -38,7 +45,7 @@ services:
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_RANDOM_ROOT_PASSWORD=yes
- TZ="Europe/Berlin"
- MARIADB_AUTO_UPGRADE=TRUE
#- MARIADB_AUTO_UPGRADE=TRUE
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
healthcheck:
test: mysql --user=${MYSQL_USER} --password=${MYSQL_PASSWORD} piler --execute "show tables"
@ -53,6 +60,8 @@ services:
image: memcached:latest
container_name: memcached_piler
restart: unless-stopped
networks:
- pilernet
cap_drop:
- ALL
command: -m 64
@ -61,6 +70,8 @@ services:
image: simatec/piler:${PILER_VERSION}
container_name: piler
restart: unless-stopped
networks:
- pilernet
expose:
- "80"
hostname: ${PILER_DOMAIN}
@ -99,15 +110,13 @@ services:
memory: 512M
limits:
memory: 512M
depends_on:
- "memcached"
- "mysql"
- memcached
- mysql
networks:
default:
external:
name: nginx-proxy
pilernet:
external: true
volumes:
db_data:

View file

@ -299,6 +299,14 @@ if [ ! -f $installPth/.env ]; then
ln -s ./piler.conf .env
fi
# create Network
if docker network inspect pilernet > /dev/null 2>&1; then
echo "Network pilernet is available"
else
docker network create pilernet
echo "Network pilernet created"
fi
# Build Piler
#cd $buildPth
#echo "${greenBold}Start Piler-Build...${normal}" && \