ci(docker): add docker compose and Caddyfile copy on server for safety

This commit is contained in:
2026-01-08 12:56:54 +01:00
parent 152b710fb8
commit 143371da4b
3 changed files with 17 additions and 1 deletions

11
Caddyfile Normal file
View File

@@ -0,0 +1,11 @@
:80 {
root * /usr/share/caddy
file_server
# No cache, always update
header {
Cache-Control "no-cache, no-store, must-revalidate"
Pragma "no-cache"
Expires "0"
}
}

View File

@@ -10,11 +10,13 @@ WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
# Copy all
# Copy all and build
COPY . .
RUN pnpm build
# --- DEPLOY ---
FROM caddy:alpine
COPY --from=build /app/dist /usr/share/caddy
COPY Caddyfile /etc/caddy/Caddyfile
EXPOSE 80

3
Jenkinsfile vendored
View File

@@ -18,6 +18,9 @@ pipeline {
steps {
echo "Deploy new portfolio version..."
sh "docker compose up -d"
// Keep updated docker-compose.yml for safety
sh "cp docker-compose.yml /home/lucas/services/portfolio/docker-compose.yml"
}
}
}