Skip to content

Commit eca8852

Browse files
committed
init
0 parents  commit eca8852

4 files changed

Lines changed: 143 additions & 0 deletions

File tree

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Dockerfile
2+
README.md
3+
.vscode/
4+
.github/

.github/workflows/docker-hub.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: build-image
2+
on:
3+
push:
4+
paths:
5+
- "Dockerfile"
6+
branches:
7+
- main
8+
9+
concurrency:
10+
group: ${{ github.ref }}-${{ github.workflow }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build-image:
15+
name: build-image
16+
runs-on: ubuntu-latest
17+
18+
# Add "id-token" with the intended permissions.
19+
permissions:
20+
contents: "read"
21+
id-token: "write"
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- id: "auth"
27+
name: "Authenticate to Google Cloud"
28+
uses: "google-github-actions/auth@v2"
29+
with:
30+
workload_identity_provider: "projects/753698311885/locations/global/workloadIdentityPools/github-pool/providers/github-provider"
31+
service_account: "github-service-account@nitraai.iam.gserviceaccount.com"
32+
33+
- id: secrets
34+
uses: google-github-actions/get-secretmanager-secrets@main
35+
with:
36+
secrets: |-
37+
docker-hub:nitraai/docker-hub
38+
39+
- name: Login to DockerHub
40+
uses: docker/login-action@v3
41+
with:
42+
username: vitaliytv
43+
password: ${{ steps.secrets.outputs.docker-hub }}
44+
45+
- name: Set up Docker Context for Buildx
46+
id: buildx-context
47+
run: |
48+
docker context create builders
49+
50+
- name: Set up Docker Buildx
51+
id: buildx
52+
uses: docker/setup-buildx-action@v1
53+
with:
54+
version: latest
55+
endpoint: builders
56+
57+
- name: build and push amd64
58+
run: |
59+
docker buildx build . \
60+
--platform linux/amd64 \
61+
--tag nitra/postgresql-18-system-trixie-custom:latest \
62+
--tag "nitra/postgresql-18-system-trixie-custom:${GITHUB_SHA::8}" \
63+
--push

.vscode/settings.json

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"cSpell.words": [
3+
"acvdg",
4+
"bitnami",
5+
"buildx",
6+
"cloudnative",
7+
"CNPG",
8+
"corepack",
9+
"crpaerfcq",
10+
"dearmor",
11+
"depcheck",
12+
"esbuild",
13+
"keyrings",
14+
"libasound",
15+
"libexec",
16+
"libgbm",
17+
"libgconf",
18+
"libnotify",
19+
"libnss",
20+
"libodbc",
21+
"libxss",
22+
"libxtst",
23+
"nitra",
24+
"nitraai",
25+
"nodesource",
26+
"nodistro",
27+
"oxlint",
28+
"pipefail",
29+
"plpython",
30+
"secretmanager",
31+
"trixie",
32+
"tzdata",
33+
"vitaliytv",
34+
"xauth",
35+
"базовий",
36+
"Використовуємо",
37+
"вимагає",
38+
"встановлення",
39+
"встановлюємо",
40+
"додаємо",
41+
"запускався",
42+
"кипра",
43+
"користувача",
44+
"Обов'язково",
45+
"образ",
46+
"Оновлюємо",
47+
"пакета",
48+
"пакетів",
49+
"Перемикаємось",
50+
"повертаємось",
51+
"поточний",
52+
"репозиторії",
53+
"розширення",
54+
"того",
55+
"швидше"
56+
]
57+
}

Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Використовуємо ваш поточний базовий образ
2+
FROM ghcr.io/cloudnative-pg/postgresql:18-system-trixie
3+
4+
# Перемикаємось на root для встановлення пакетів
5+
USER root
6+
7+
# Оновлюємо репозиторії та встановлюємо розширення
8+
# postgresql-18-cron -> для pg_cron
9+
# postgresql-plpython3-18 -> для plpython3u
10+
RUN apt-get update && \
11+
apt-get install -y \
12+
postgresql-18-cron \
13+
postgresql-plpython3-18 && \
14+
rm -rf /var/lib/apt/lists/*
15+
16+
# Обов'язково повертаємось до користувача postgres, як того вимагає CNPG
17+
USER postgres
18+
19+
#

0 commit comments

Comments
 (0)