Remove keys volume mount and add install script
- Remove /etc/provisioning/keys mount (ephemeral keys are in-memory now) - Remove /etc/provisioning VOLUME from Dockerfile - Add deploy/install.sh that creates config files before docker compose up, preventing Docker from creating directories in place of missing bind mounts - Update README with install script usage Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -38,18 +38,20 @@ No static SSH keys required — Provisioning generates ephemeral keys per rebuil
|
|||||||
### Setup
|
### Setup
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mkdir -p /opt/provisioning
|
|
||||||
cd /opt/provisioning
|
|
||||||
|
|
||||||
# Log in to the container registry
|
# Log in to the container registry
|
||||||
docker login gitea.thewrightserver.net
|
docker login gitea.thewrightserver.net
|
||||||
|
|
||||||
# Pull the compose file
|
# Run the install script (creates /opt/provisioning with config templates)
|
||||||
curl -sO https://gitea.thewrightserver.net/josh/Provisioning/raw/branch/main/docker-compose.yml
|
curl -sf https://gitea.thewrightserver.net/josh/Provisioning/raw/branch/main/deploy/install.sh | bash
|
||||||
|
```
|
||||||
|
|
||||||
# Pull example configs
|
Or manually:
|
||||||
curl -s https://gitea.thewrightserver.net/josh/Provisioning/raw/branch/main/deploy/provisioning.example.yaml -o provisioning.yaml
|
|
||||||
curl -s https://gitea.thewrightserver.net/josh/Provisioning/raw/branch/main/deploy/server-types.example.yaml -o server-types.yaml
|
```bash
|
||||||
|
mkdir -p /opt/provisioning && cd /opt/provisioning
|
||||||
|
curl -sfO https://gitea.thewrightserver.net/josh/Provisioning/raw/branch/main/docker-compose.yml
|
||||||
|
curl -sf https://gitea.thewrightserver.net/josh/Provisioning/raw/branch/main/deploy/provisioning.example.yaml -o provisioning.yaml
|
||||||
|
curl -sf https://gitea.thewrightserver.net/josh/Provisioning/raw/branch/main/deploy/server-types.example.yaml -o server-types.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
### Configure
|
### Configure
|
||||||
|
|||||||
+2
-2
@@ -19,10 +19,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
|
|
||||||
COPY --from=builder /provisioning /usr/local/bin/provisioning
|
COPY --from=builder /provisioning /usr/local/bin/provisioning
|
||||||
|
|
||||||
RUN mkdir -p /data /etc/provisioning/keys
|
RUN mkdir -p /data
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
VOLUME ["/data", "/etc/provisioning"]
|
VOLUME ["/data"]
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/local/bin/provisioning"]
|
ENTRYPOINT ["/usr/local/bin/provisioning"]
|
||||||
CMD ["-config", "/etc/provisioning/provisioning.yaml"]
|
CMD ["-config", "/etc/provisioning/provisioning.yaml"]
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
DEPLOY_DIR="${1:-/opt/provisioning}"
|
||||||
|
|
||||||
|
mkdir -p "$DEPLOY_DIR"
|
||||||
|
cd "$DEPLOY_DIR"
|
||||||
|
|
||||||
|
REPO_RAW="https://gitea.thewrightserver.net/josh/Provisioning/raw/branch/main"
|
||||||
|
|
||||||
|
# Always pull latest compose file
|
||||||
|
curl -sfO "$REPO_RAW/docker-compose.yml"
|
||||||
|
|
||||||
|
# Create config files from examples if they don't exist
|
||||||
|
if [ ! -f provisioning.yaml ]; then
|
||||||
|
curl -sf "$REPO_RAW/deploy/provisioning.example.yaml" -o provisioning.yaml
|
||||||
|
echo "Created provisioning.yaml — edit it with your values before starting."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f server-types.yaml ]; then
|
||||||
|
curl -sf "$REPO_RAW/deploy/server-types.example.yaml" -o server-types.yaml
|
||||||
|
echo "Created server-types.yaml — edit it with your hardware types."
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Deploy directory: $DEPLOY_DIR"
|
||||||
|
echo ""
|
||||||
|
echo "Next steps:"
|
||||||
|
echo " 1. Edit provisioning.yaml with your network/cluster settings"
|
||||||
|
echo " 2. Edit server-types.yaml with your hardware types"
|
||||||
|
echo " 3. docker compose up -d"
|
||||||
@@ -7,7 +7,6 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./provisioning.yaml:/etc/provisioning/provisioning.yaml:ro
|
- ./provisioning.yaml:/etc/provisioning/provisioning.yaml:ro
|
||||||
- ./server-types.yaml:/etc/provisioning/server-types.yaml:ro
|
- ./server-types.yaml:/etc/provisioning/server-types.yaml:ro
|
||||||
- ./keys:/etc/provisioning/keys:ro
|
|
||||||
- data:/data
|
- data:/data
|
||||||
command: ["-config", "/etc/provisioning/provisioning.yaml"]
|
command: ["-config", "/etc/provisioning/provisioning.yaml"]
|
||||||
cap_add:
|
cap_add:
|
||||||
|
|||||||
Reference in New Issue
Block a user