1
0
Fork 0

fix networking

This commit is contained in:
Massaki Archambault 2020-08-29 12:38:44 -04:00
parent 8e91aa8936
commit d05812e9d6
4 changed files with 6 additions and 8 deletions

View File

@ -7,7 +7,7 @@ secretGenerator:
type: Opaque type: Opaque
behavior: create behavior: create
literals: literals:
- host=172.18.1.0:3306 - host=mariadb-localhost:3306
- database=gitea - database=gitea
- username=gitea - username=gitea
- password=changeme - password=changeme

View File

@ -12,7 +12,7 @@ secretGenerator:
type: Opaque type: Opaque
behavior: create behavior: create
literals: literals:
- host=172.18.1.0:3306 - host=mariadb-localhost:3306
- database=grafana - database=grafana
- username=grafana - username=grafana
- password=changeme - password=changeme

View File

@ -8,7 +8,7 @@ secretGenerator:
type: Opaque type: Opaque
behavior: create behavior: create
literals: literals:
- host=172.18.1.0:3306 - host=mariadb-localhost:3306
- database=nextcloud - database=nextcloud
- username=nextcloud - username=nextcloud
- password=changeme - password=changeme

View File

@ -38,11 +38,11 @@ if ! docker ps -a | grep registry-localhost &>/dev/null; then
docker volume create local_registry docker volume create local_registry
docker run -d \ docker run -d \
--name registry-localhost \ --name registry-localhost \
--net "k3d-$cluster_name" \
--volume local_registry:/var/lib/registry \ --volume local_registry:/var/lib/registry \
--restart always \ --restart always \
-p 5000:5000 \ -p 5000:5000 \
registry:2 registry:2
docker network connect "k3d-$cluster_name" registry-localhost
fi fi
# local mariadb database # local mariadb database
@ -50,13 +50,12 @@ if ! docker ps -a | grep mariadb-localhost &>/dev/null; then
docker volume create local_mariadb docker volume create local_mariadb
docker run -d \ docker run -d \
--name mariadb-localhost \ --name mariadb-localhost \
--ip 172.18.1.0 \ --net "k3d-$cluster_name" \
--volume local_mariadb:/var/lib/mysql \ --volume local_mariadb:/var/lib/mysql \
--restart always \ --restart always \
--env MYSQL_ROOT_PASSWORD=changeme \ --env MYSQL_ROOT_PASSWORD=changeme \
-p 3306:3306 \ -p 3306:3306 \
mariadb:10.5 mariadb:10.5
docker network connect "k3d-$cluster_name" mariadb-localhost
sleep 10 sleep 10
fi fi
@ -65,7 +64,7 @@ if ! docker ps -a | grep nfs-localhost &>/dev/null; then
docker volume create local_nfs docker volume create local_nfs
docker run -d \ docker run -d \
--name nfs-localhost \ --name nfs-localhost \
--ip 172.18.1.1 \ --net "k3d-$cluster_name" \
--volume nfs_local:/data \ --volume nfs_local:/data \
--volume /lib/modules:/lib/modules:ro \ --volume /lib/modules:/lib/modules:ro \
--restart always \ --restart always \
@ -76,7 +75,6 @@ if ! docker ps -a | grep nfs-localhost &>/dev/null; then
--env NFS_LOG_LEVEL=DEBUG \ --env NFS_LOG_LEVEL=DEBUG \
-p 2049:2049 \ -p 2049:2049 \
erichough/nfs-server:2.2.1 erichough/nfs-server:2.2.1
docker network connect "k3d-$cluster_name" nfs-localhost
sleep 10 sleep 10
fi fi