Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5e9bba2
test auto-assign PR
TVW96 Feb 3, 2026
9e4c397
container: nsc-events-fullstack
TVW96 Feb 6, 2026
50927a0
merge changes from main
TVW96 Feb 6, 2026
90f1c1d
Install playwright update, regenerate package-lock.json file
TVW96 Feb 7, 2026
034963a
Stabilize e2e tests and align workspace dependencies
TVW96 Feb 7, 2026
72423dd
refactor: Docker configuration and centralize routing through Traefik…
TVW96 Feb 7, 2026
4620425
fixed docker environmnet variable configuration
TVW96 Feb 16, 2026
c1f3a2d
Merge branch 'migration/docker-postgres'
TVW96 Feb 16, 2026
890a610
Merge branch 'main' into bug-135-e2e-schema-compat-pipeline-optimizat…
TVW96 Feb 19, 2026
e255fbf
add healthcheck to nestjs service
TVW96 Feb 23, 2026
09bedb2
Merge remote-tracking branch 'origin/main' into migration/docker-post…
TVW96 Feb 24, 2026
1694878
update setup scripts
TVW96 Feb 27, 2026
4c1ba91
attempt to fix npm ci issue
TVW96 Feb 27, 2026
c034f80
ghost dependencies 👻
TVW96 Feb 28, 2026
7b3aca4
attempt #1: fix failing e2e tests
TVW96 Feb 28, 2026
37c8a62
align postgres_password value with e2e
TVW96 Feb 28, 2026
1707249
replace env_file option with environment adding default expansion for…
TVW96 Feb 28, 2026
cf538b5
use docker compose for e2e tests instead of separate service containers
TVW96 Feb 28, 2026
7d3b3dc
increase playwright test timeout limit
TVW96 Feb 28, 2026
fe7e13e
supply pgadmin fallback values for CLI
TVW96 Feb 28, 2026
befe0c2
Delete package-lock.json
TVW96 Mar 13, 2026
021cac3
Revert "Delete package-lock.json"
TVW96 Mar 13, 2026
37cba87
Orchestration & App Image level healthchecks
TVW96 Apr 15, 2026
4e9a8d6
Health Check Dependency svg
TVW96 Apr 15, 2026
01b276d
fix: update e2e global setup to match Docker dependency chain
TVW96 Apr 15, 2026
53b67ce
Add Deterministic Global-Teardown
TVW96 Apr 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Include any files or directories that you don't want to be copied to your
# container here (e.g., local build artifacts, temporary files, etc.).
#
# For more help, visit the .dockerignore file reference guide at
# https://docs.docker.com/go/build-context-dockerignore/

**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/.next
**/.cache
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/charts
**/docker-compose*
**/compose.y*ml
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
**/build
**/dist
LICENSE
README.md
13 changes: 13 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Shared Database Configuration
# Used by both postgres service and application services
POSTGRES_HOST=postgres
POSTGRES_USER=postgres
POSTGRES_PASSWORD=1234
POSTGRES_DATABASE=nsc_events
POSTGRES_PORT=5432

# pgAdmin Configuration
PGADMIN_DEFAULT_EMAIL=admin@example.com
PGADMIN_DEFAULT_PASSWORD=1234
PGADMIN_CONFIG_SERVER_MODE=False
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED=False
102 changes: 8 additions & 94 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,21 +123,6 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15

services:
postgres:
image: postgres:14
env:
POSTGRES_DB: nsc_events
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- uses: actions/checkout@v4

Expand All @@ -151,10 +136,6 @@ jobs:
- name: Clean install dependencies
run: HUSKY=0 npm ci --include=optional

- name: Install sharp for Linux platform
run: npm install --os=linux --cpu=x64 sharp
working-directory: ./nsc-events-nestjs

- name: Get Playwright version
id: playwright-version
run: echo "version=$(npm ls @playwright/test --json | jq -r '.dependencies["@playwright/test"].version')" >> $GITHUB_OUTPUT
Expand All @@ -174,38 +155,14 @@ jobs:
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: npx playwright install-deps chromium

- name: Build backend
run: npm run build:backend

- name: Build frontend
env:
NEXT_PUBLIC_API_URL: http://localhost:3000/api
run: npm run build:frontend

- name: Wait for database
run: |
for i in {1..30}; do
if pg_isready -h localhost -p 5432 -U postgres; then
echo "Database is ready"
exit 0
fi
echo "Attempt $i: Database not ready yet..."
sleep 2
done
echo "Database did not become ready in time"
exit 1

- name: Run Smoke Tests (Chromium only, critical paths)
env:
PLAYWRIGHT_BASE_URL: http://localhost:8080
PLAYWRIGHT_API_URL: http://localhost:3000/api
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DATABASE: nsc_events
# These are inherited by docker compose (via playwright webServer) using ${VAR:-default} in compose.yaml
NODE_ENV: test
JWT_SECRET: e2e-test-jwt-secret-key
# PLAYWRIGHT_BASE_URL defaults to http://localhost (Traefik port 80) in playwright.config.ts
# PLAYWRIGHT_API_URL defaults to http://localhost (routed through Traefik to /api)
PLAYWRIGHT_API_URL: http://localhost/api
run: npx playwright test --project=chromium --grep @smoke

- name: Archive Playwright report
Expand Down Expand Up @@ -259,21 +216,6 @@ jobs:
# Run browsers in parallel shards
shard: [1, 2]

services:
postgres:
image: postgres:14
env:
POSTGRES_DB: nsc_events
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- uses: actions/checkout@v4

Expand All @@ -287,10 +229,6 @@ jobs:
- name: Clean install dependencies
run: HUSKY=0 npm ci --include=optional

- name: Install sharp for Linux platform
run: npm install --os=linux --cpu=x64 sharp
working-directory: ./nsc-events-nestjs

- name: Get Playwright version
id: playwright-version
run: echo "version=$(npm ls @playwright/test --json | jq -r '.dependencies["@playwright/test"].version')" >> $GITHUB_OUTPUT
Expand All @@ -310,38 +248,14 @@ jobs:
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: npx playwright install-deps

- name: Build backend
run: npm run build:backend

- name: Build frontend
env:
NEXT_PUBLIC_API_URL: http://localhost:3000/api
run: npm run build:frontend

- name: Wait for database
run: |
for i in {1..30}; do
if pg_isready -h localhost -p 5432 -U postgres; then
echo "Database is ready"
exit 0
fi
echo "Attempt $i: Database not ready yet..."
sleep 2
done
echo "Database did not become ready in time"
exit 1

- name: Run E2E tests (Shard ${{ matrix.shard }}/2)
env:
PLAYWRIGHT_BASE_URL: http://localhost:8080
PLAYWRIGHT_API_URL: http://localhost:3000/api
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DATABASE: nsc_events
# These are inherited by docker compose (via playwright webServer) using ${VAR:-default} in compose.yaml
NODE_ENV: test
JWT_SECRET: e2e-test-jwt-secret-key
# PLAYWRIGHT_BASE_URL defaults to http://localhost (Traefik port 80) in playwright.config.ts
# PLAYWRIGHT_API_URL defaults to http://localhost (routed through Traefik to /api)
PLAYWRIGHT_API_URL: http://localhost/api
run: npx playwright test --shard=${{ matrix.shard }}/2

- name: Archive Playwright report
Expand Down
22 changes: 22 additions & 0 deletions README.Docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
### Building and running your application

When you're ready, start your application by running:
`docker compose up --build`.

Your application will be available at http://localhost:5432.

### Deploying your application to the cloud

First, build your image, e.g.: `docker build -t myapp .`.
If your cloud uses a different CPU architecture than your development
machine (e.g., you are on a Mac M1 and your cloud provider is amd64),
you'll want to build the image for that platform, e.g.:
`docker build --platform=linux/amd64 -t myapp .`.

Then, push it to your registry, e.g. `docker push myregistry.com/myapp`.

Consult Docker's [getting started](https://docs.docker.com/go/get-started-sharing/)
docs for more detail on building and pushing.

### References
* [Docker's Node.js guide](https://docs.docker.com/language/nodejs/)
Loading
Loading