-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: store umbrelos deployment files
- Loading branch information
Showing
5 changed files
with
762 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
version: "3.7" | ||
|
||
services: | ||
app_proxy: | ||
environment: | ||
APP_HOST: formicaio-apps-formicaio_nginx_1 | ||
APP_PORT: 52100 | ||
container_name: formicaio-apps-formicaio_app_proxy_1 | ||
nginx: | ||
image: nginx:alpine | ||
volumes: | ||
- ${APP_DATA_DIR}/nginx.conf:/etc/nginx/conf.d/default.conf | ||
extra_hosts: | ||
- host.docker.internal:host-gateway | ||
container_name: formicaio-apps-formicaio_nginx_1 | ||
docker: | ||
image: >- | ||
docker:27.4.1-dind@sha256:3c8fb358b82767a38189e54a89a2ba8d71109f0a17efa87fd009ef8283c46df6 | ||
privileged: true | ||
network_mode: host | ||
stop_grace_period: 1m | ||
restart: on-failure | ||
environment: | ||
DOCKER_ENSURE_BRIDGE: dind0:10.32.0.1/16 | ||
entrypoint: /entrypoint.sh | ||
command: | | ||
dockerd | ||
--bridge dind0 | ||
--data-root /data/data | ||
--exec-root /data/exec | ||
--host unix:///data/docker.sock | ||
--pidfile /data/docker.pid | ||
volumes: | ||
- ${APP_DATA_DIR}/entrypoint.sh:/entrypoint.sh | ||
- ${APP_DATA_DIR}/data/docker:/data | ||
container_name: formicaio-apps-formicaio_docker_1 | ||
formicaio: | ||
image: bochaco/formicaio:latest | ||
privileged: true | ||
network_mode: host | ||
restart: on-failure | ||
stop_grace_period: 5s | ||
environment: | ||
NODE_CONTAINER_IMAGE_TAG: latest | ||
DOCKER_SOCKET_PATH: /var/run/docker.sock | ||
DB_PATH: /data | ||
volumes: | ||
- ${APP_DATA_DIR}/data/formicaio:/data | ||
- ${APP_DATA_DIR}/data/docker:/var/run | ||
devices: | ||
- /dev:/dev | ||
container_name: formicaio-apps-formicaio_formicaio_1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/sh | ||
|
||
# This hack can be removed if https://github.com/docker-library/docker/pull/444 gets merged. | ||
|
||
# Remove docker pidfile if it exists to ensure Docker can start up after a bad shutdown | ||
pidfile="/var/run/docker.pid" | ||
if [[ -f "${pidfile}" ]] | ||
then | ||
rm -f "${pidfile}" | ||
fi | ||
|
||
# Use nftables as the backend for iptables | ||
for command in iptables iptables-restore iptables-restore-translate iptables-save iptables-translate | ||
do | ||
ln -sf /sbin/xtables-nft-multi /sbin/$command | ||
done | ||
|
||
# Ensure that a bridge exists with the given name | ||
ensure_bridge_exists() { | ||
local name="${1}" | ||
local ip_range="${2}" | ||
|
||
# Check if the bridge already exists | ||
if ip link show "${name}" &>/dev/null | ||
then | ||
echo "Bridge '${name}' already exists. Skipping creation." | ||
ip addr show "${name}" | ||
return | ||
fi | ||
|
||
echo "Bridge '${name}' does not exist. Creating..." | ||
ip link add "${name}" type bridge | ||
ip addr add "${ip_range}" dev "${name}" | ||
ip link set "${name}" up | ||
|
||
echo "Bridge '${name}' is now up with IP range '${ip_range}'." | ||
ip addr show "${name}" | ||
} | ||
|
||
if [[ "${DOCKER_ENSURE_BRIDGE}" != "" ]] | ||
then | ||
bridge="${DOCKER_ENSURE_BRIDGE%%:*}" | ||
ip_range="${DOCKER_ENSURE_BRIDGE#*:}" | ||
ensure_bridge_exists "${bridge}" "${ip_range}" | ||
fi | ||
|
||
exec dockerd-entrypoint.sh $@ |
Oops, something went wrong.