Compare commits
7 Commits
89d3a39679
...
0.2.2
| Author | SHA1 | Date | |
|---|---|---|---|
| 1cea82f5d9 | |||
| 418034f639 | |||
| 489dde812f | |||
| c2e4e614e0 | |||
| 344071193c | |||
| 03118e59d7 | |||
| 15fea78505 |
62
.github/workflows/pg-compat-matrix.yml
vendored
62
.github/workflows/pg-compat-matrix.yml
vendored
@@ -67,65 +67,3 @@ jobs:
|
||||
env:
|
||||
PG_DSN_CANDIDATES: postgresql://postgres:postgres@postgres:5432/compatdb?sslmode=disable,postgresql://postgres:postgres@127.0.0.1:5432/compatdb?sslmode=disable
|
||||
run: python backend/scripts/pg_compat_smoke.py
|
||||
|
||||
backend-alpine-smoke:
|
||||
name: Backend Alpine smoke (PG16)
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16
|
||||
env:
|
||||
POSTGRES_DB: compatdb
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
ports:
|
||||
- 5432:5432
|
||||
options: >-
|
||||
--health-cmd "pg_isready -U postgres -d compatdb"
|
||||
--health-interval 5s
|
||||
--health-timeout 5s
|
||||
--health-retries 20
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Enable pg_stat_statements in service container
|
||||
run: |
|
||||
PG_CID="$(docker ps --filter "ancestor=postgres:16" --format "{{.ID}}" | head -n1)"
|
||||
if [ -z "$PG_CID" ]; then
|
||||
echo "Could not find postgres service container for version 16"
|
||||
docker ps -a
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Using postgres container: $PG_CID"
|
||||
docker exec "$PG_CID" psql -U postgres -d compatdb -c "ALTER SYSTEM SET shared_preload_libraries = 'pg_stat_statements';"
|
||||
docker restart "$PG_CID"
|
||||
|
||||
for i in $(seq 1 40); do
|
||||
if docker exec "$PG_CID" pg_isready -U postgres -d compatdb; then
|
||||
break
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
|
||||
docker exec "$PG_CID" psql -U postgres -d compatdb -c "CREATE EXTENSION IF NOT EXISTS pg_stat_statements;"
|
||||
|
||||
- name: Build backend image with Alpine base
|
||||
run: |
|
||||
docker build \
|
||||
-f backend/Dockerfile \
|
||||
--build-arg PYTHON_BASE_IMAGE=python:3.13-alpine \
|
||||
-t nexapg-backend-alpine-smoke:ci \
|
||||
./backend
|
||||
|
||||
- name: Run smoke checks in backend Alpine image
|
||||
env:
|
||||
PG_DSN_CANDIDATES: postgresql://postgres:postgres@127.0.0.1:5432/compatdb?sslmode=disable
|
||||
run: |
|
||||
docker run --rm --network host \
|
||||
-e PG_DSN_CANDIDATES="${PG_DSN_CANDIDATES}" \
|
||||
nexapg-backend-alpine-smoke:ci \
|
||||
python /app/scripts/pg_compat_smoke.py
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ARG PYTHON_BASE_IMAGE=python:3.13-slim
|
||||
ARG PYTHON_BASE_IMAGE=python:3.13-alpine
|
||||
FROM ${PYTHON_BASE_IMAGE} AS base
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
|
||||
@@ -2,7 +2,7 @@ from functools import lru_cache
|
||||
from pydantic import field_validator
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
NEXAPG_VERSION = "0.2.0"
|
||||
NEXAPG_VERSION = "0.2.2"
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
|
||||
@@ -54,7 +54,7 @@ services:
|
||||
depends_on:
|
||||
- backend
|
||||
ports:
|
||||
- "${FRONTEND_PORT}:80"
|
||||
- "${FRONTEND_PORT}:8080"
|
||||
|
||||
volumes:
|
||||
pg_data:
|
||||
|
||||
@@ -7,9 +7,9 @@ ARG VITE_API_URL=/api/v1
|
||||
ENV VITE_API_URL=${VITE_API_URL}
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:1.29-alpine-slim
|
||||
RUN apk upgrade --no-cache
|
||||
FROM nginxinc/nginx-unprivileged:stable-alpine
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
USER 101
|
||||
EXPOSE 8080
|
||||
HEALTHCHECK --interval=30s --timeout=3s --retries=5 CMD nginx -t || exit 1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen 8080;
|
||||
server_name _;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
Reference in New Issue
Block a user