Add docker files for webserver
This commit is contained in:
parent
52e5c23571
commit
f099e9eb9f
2 changed files with 35 additions and 0 deletions
19
docker/download-and-run-playbook.sh
Normal file
19
docker/download-and-run-playbook.sh
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
REPO_URL="https://git.arrel.cloud/t3rr0rz0n3/ProxmoxLXC.git"
|
||||||
|
WORKDIR="/opt/bootstrap-ansible"
|
||||||
|
|
||||||
|
echo "[+] Instalando dependencias mínimas..."
|
||||||
|
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
apt-get update -qq
|
||||||
|
apt-get install -y -qq git
|
||||||
|
|
||||||
|
echo "[+] Preparando workspace en $WORKDIR"
|
||||||
|
rm -rf "$WORKDIR"
|
||||||
|
mkdir -p "$WORKDIR"
|
||||||
|
|
||||||
|
echo "[+] Clonando repositorio de infraestructura..."
|
||||||
|
git clone "$REPO_URL" "$WORKDIR"
|
||||||
16
docker/nginx.conf
Normal file
16
docker/nginx.conf
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
# Endpoint bonito: /run
|
||||||
|
location = /run {
|
||||||
|
default_type text/plain;
|
||||||
|
alias /data/download-and-run-playbook.sh;
|
||||||
|
add_header Content-Disposition 'attachment; filename="download-and-run-playbook.sh"';
|
||||||
|
}
|
||||||
|
|
||||||
|
# Opcional: listado para debug
|
||||||
|
location / {
|
||||||
|
return 200 "Ansible bootstrap server is running\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue