diff --git a/src/docker/dockerfile/golang.md b/src/docker/dockerfile/golang.md index 7b9418c..6a4ed56 100644 --- a/src/docker/dockerfile/golang.md +++ b/src/docker/dockerfile/golang.md @@ -4,7 +4,7 @@ ```dockerfile # Build container -FROM golang:1.17-bullseye AS build +FROM golang:1.22-bullseye AS build # Set build workdir WORKDIR /app @@ -32,7 +32,7 @@ CMD ["./app"] ## Common Dockerfile ```dockerfile -FROM golang:1.17 +FROM golang:1.22 # Set app workdir WORKDIR /go/src/app @@ -51,4 +51,4 @@ RUN go build -o app . # Run app CMD ["./app"] -``` \ No newline at end of file +``` diff --git a/src/docker/dockerfile/node.md b/src/docker/dockerfile/node.md index 20ac02a..4331c12 100644 --- a/src/docker/dockerfile/node.md +++ b/src/docker/dockerfile/node.md @@ -6,7 +6,7 @@ ```dockerfile # Build container -FROM node:17.3.0-bullseye-slim AS build +FROM node:21.7.1-bullseye-slim AS build # Set build workdir WORKDIR /usr/src/app @@ -28,7 +28,7 @@ RUN npm run build # --- # Production container -FROM nginx:1.21.5-alpine +FROM nginx:1.25.4-alpine # Copy nginx.conf COPY --from=build /usr/src/app/nginx.conf /etc/nginx/conf.d/default.conf @@ -40,7 +40,7 @@ COPY --from=build /usr/src/app/build/ /usr/share/nginx/html/ ### nginx.conf ```nginx configuration -server { +server { listen 80; server_name _ default_server; location / { @@ -53,7 +53,7 @@ server { ## Common Dockerfile ```dockerfile -FROM node:17.3.0-bullseye-slim +FROM node:21.7.1-bullseye-slim # Set app workdir WORKDIR /usr/src/app @@ -72,4 +72,4 @@ RUN CI=true npm run test # Run app CMD ["npm", "run", "production"] -``` \ No newline at end of file +``` diff --git a/src/docker/dockerfile/python.md b/src/docker/dockerfile/python.md index 9e562d1..349df51 100644 --- a/src/docker/dockerfile/python.md +++ b/src/docker/dockerfile/python.md @@ -3,7 +3,7 @@ ## Common Dockerfile ```dockerfile -FROM python:3.9 +FROM python:3.13 # Stdout without buffer ENV PYTHONUNBUFFERED=1 @@ -22,4 +22,4 @@ COPY . . # Run app CMD ["python", "app.py"] -``` \ No newline at end of file +``` diff --git a/src/github/docker.md b/src/github/docker.md index 88738e8..0f2b4bb 100644 --- a/src/github/docker.md +++ b/src/github/docker.md @@ -3,7 +3,7 @@ ```yaml name: Docker -on: [ push ] +on: [push] env: REGISTRY: ghcr.io @@ -41,4 +41,4 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} -``` \ No newline at end of file +``` diff --git a/src/github/pages.md b/src/github/pages.md index 4092f6e..4a6c408 100644 --- a/src/github/pages.md +++ b/src/github/pages.md @@ -3,7 +3,7 @@ ```yaml name: Github Pages -on: [ push ] +on: [push] jobs: pages: @@ -22,4 +22,4 @@ jobs: with: branch: gh-pages folder: build -``` \ No newline at end of file +``` diff --git a/src/github/ssh.md b/src/github/ssh.md index 169834b..5bc2ab7 100644 --- a/src/github/ssh.md +++ b/src/github/ssh.md @@ -1,31 +1,31 @@ # Run SSH command ```yaml -name: Docker +name: Deploy -on: [ push ] +on: [push] jobs: - build: + deploy: runs-on: ubuntu-latest steps: # ... - + - name: ssh-pipeline - uses: cross-the-world/ssh-pipeline@v1.2.0 + uses: appleboy/ssh-action@v1.0.3 with: host: ${{ secrets.SSH_HOST }} port: ${{ secrets.SSH_PORT }} - user: ${{ secrets.SSH_USER }} + username: ${{ secrets.SSH_USER }} key: ${{ secrets.SSH_KEY }} script: | - command1 - command2 + someSshCommand ``` ## Secrets + - `SSH_HOST` - `SSH_PORT` - `SSH_USER` -- `SSH_KEY` \ No newline at end of file +- `SSH_KEY`