File tree Expand file tree Collapse file tree 6 files changed +61
-6
lines changed
Expand file tree Collapse file tree 6 files changed +61
-6
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ name: ~ build
33on :
44 workflow_call :
55 inputs :
6+ version :
7+ type : string
8+ required : true
69 tag :
710 type : string
811 required : true
@@ -28,23 +31,23 @@ jobs:
2831 - name : ' Build Postgres Image for linux/amd64'
2932 run : |
3033 docker build \
31- -f Dockerfile.postgres \
34+ -f Dockerfile${{ inputs.version }} .postgres \
3235 --platform linux/amd64 \
3336 -t ghcr.io/trycompa/postgres:${{ inputs.tag }}-linux-amd64 \
3437 --push .
3538
3639 - name : ' Build Postgres Image for linux/arm64'
3740 run : |
3841 docker buildx build \
39- -f Dockerfile.postgres \
42+ -f Dockerfile${{ inputs.version }} .postgres \
4043 --platform linux/arm64 \
4144 -t ghcr.io/trycompa/postgres:${{ inputs.tag }}-linux-arm64 \
4245 --push .
4346
4447 - name : ' Build Postgres Multi-Architecture Image'
4548 run : |
4649 docker buildx build \
47- -f Dockerfile.postgres \
50+ -f Dockerfile${{ inputs.version }} .postgres \
4851 --platform linux/amd64,linux/arm64 \
4952 -t ghcr.io/trycompa/postgres:${{ inputs.tag }} \
5053 --push .
Original file line number Diff line number Diff line change 88jobs :
99 docker :
1010 name : docker
11+ strategy :
12+ matrix :
13+ version : [14, 15, 16]
1114 uses : ./.github/workflows/_docker.yml
1215 with :
13- tag : ' 14'
16+ version : " ${{ matrix.version }}"
17+ tag : " ${{ matrix.version }}"
Original file line number Diff line number Diff line change 77jobs :
88 docker :
99 name : docker
10+ strategy :
11+ matrix :
12+ version : [14, 15, 16]
1013 uses : ./.github/workflows/_docker.yml
1114 with :
12- tag : 14-${{ github.sha }}
15+ version : " ${{ matrix.version }}"
16+ tag : " ${{ matrix.version }}-${{ github.sha }}"
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ RUN apt-get update && apt-get install -y \
88 build-essential \
99 git \
1010 postgresql-server-dev-14 \
11- && git clone --branch v0.5.1 https://github.com/pgvector/pgvector.git \
11+ && git clone --branch v0.8.0 https://github.com/pgvector/pgvector.git \
1212 && cd pgvector \
1313 && make \
1414 && make install \
Original file line number Diff line number Diff line change 1+ # Same major version as production
2+ FROM imresamu/postgis:15-3.4
3+ LABEL org.opencontainers.image.source="https://github.com/trycompa/docker-postgres"
4+
5+
6+ # Install build dependencies and pgvector
7+ RUN apt-get update && apt-get install -y \
8+ build-essential \
9+ git \
10+ postgresql-server-dev-15 \
11+ && git clone --branch v0.8.0 https://github.com/pgvector/pgvector.git \
12+ && cd pgvector \
13+ && make \
14+ && make install \
15+ && cd .. \
16+ && rm -rf pgvector \
17+ && apt-get remove -y build-essential git postgresql-server-dev-15 \
18+ && apt-get autoremove -y \
19+ && rm -rf /var/lib/apt/lists/*
20+
21+ # log all queries
22+ CMD ["postgres", "-c", "log_statement=all"]
Original file line number Diff line number Diff line change 1+ # Same major version as production
2+ FROM imresamu/postgis:16-3.4
3+ LABEL org.opencontainers.image.source="https://github.com/trycompa/docker-postgres"
4+
5+
6+ # Install build dependencies and pgvector
7+ RUN apt-get update && apt-get install -y \
8+ build-essential \
9+ git \
10+ postgresql-server-dev-16 \
11+ && git clone --branch v0.8.0 https://github.com/pgvector/pgvector.git \
12+ && cd pgvector \
13+ && make \
14+ && make install \
15+ && cd .. \
16+ && rm -rf pgvector \
17+ && apt-get remove -y build-essential git postgresql-server-dev-16 \
18+ && apt-get autoremove -y \
19+ && rm -rf /var/lib/apt/lists/*
20+
21+ # log all queries
22+ CMD ["postgres", "-c", "log_statement=all"]
You can’t perform that action at this time.
0 commit comments