PSA/setup/Dockerfile.ubuntu
Hermes 284313f908
Some checks are pending
Bidi Control Character Guard / bidi-control-guard (push) Waiting to run
Circular Dependency Check / Check for new circular dependencies (push) Waiting to run
Citus Migration Smoke / Combined migrations on single-node Citus (push) Waiting to run
E2E Fresh Install Tests / fresh-install-e2e (push) Waiting to run
ext-v2 guardrails / Run ext-v2 guard and ESLint (push) Waiting to run
Integration Tests / Check for relevant changes (push) Waiting to run
Integration Tests / ${{ (github.event_name == 'schedule' || github.event.inputs.suite == 'full') && 'Full integration suite' || 'Tier-1 integration subset' }} (push) Blocked by required conditions
Mobile checks / Mobile lint + typecheck (push) Waiting to run
Mobile checks / Mobile unit tests (push) Waiting to run
Mobile checks / Mobile dependency audit (report) (push) Waiting to run
Mobile checks / Mobile reproducibility checks (push) Waiting to run
Secrets guard (env backups) / Ensure no tracked env backup files (push) Waiting to run
Temporal Readiness / fast-readiness (push) Waiting to run
Temporal Readiness / docker-parity (push) Waiting to run
TypeScript Type Check / Nx affected typecheck (push) Waiting to run
Unit Tests / Skipped-test budget (push) Waiting to run
Unit Tests / Nx affected unit tests (push) Waiting to run
Unit Tests / Server unit coverage (informational) (push) Waiting to run
Validate Tenant Management Schema / Check for relevant changes (push) Waiting to run
Validate Tenant Management Schema / Validate Tenant Management Schema (push) Blocked by required conditions
EE Workflows Build Guard / ee-workflows-build-guard (push) Waiting to run
Initial import of AlgaPSA codebase from PSA server
Excluded: .git, node_modules, secrets/, compose.env, assemblyscript tgz

Source: /opt/alga-psa on psa.joliet.tech
2026-06-22 16:12:17 -05:00

71 lines
2.3 KiB
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive \
NODE_VERSION=22 \
PATH=/usr/local/bin:/usr/bin:/bin
WORKDIR /app
# 1) Base OS deps and Postgres client
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gnupg \
postgresql-client \
sqlite3 \
git \
&& rm -rf /var/lib/apt/lists/*
# 2) Install Node.js (NodeSource) default to current active LTS (22)
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash - \
&& apt-get update \
&& apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/* \
&& node --version && npm --version
# 3) Copy minimal workspace manifests first for better layer caching
COPY package.json package-lock.json tsconfig.base.json ./
COPY shared/package.json ./shared/
COPY server/package.json ./server/
# 4) Install root workspaces (will create node_modules and workspace links)
# Use npm ci if lockfile is present
# Note: Do NOT use --no-optional as rollup needs platform-specific binaries (@rollup/rollup-linux-x64-gnu)
RUN npm ci --workspaces --legacy-peer-deps || npm install --workspaces --legacy-peer-deps
# 5) Build the shared package so dist/* is available for setup scripts
COPY shared/ ./shared/
WORKDIR /app/shared
RUN npm run build
# 6) Bring in server setup artifacts needed at runtime
WORKDIR /app
COPY server/setup/create_database.js ./server/setup/
COPY server/knexfile.cjs ./server/
COPY server/migrations ./server/migrations
COPY server/seeds ./server/seeds
COPY server/src/invoice-templates/assemblyscript ./server/src/invoice-templates/assemblyscript
# 7) Install CLI tools used by entrypoint
RUN npm install -g knex
# 8) Setup dir and entrypoint
WORKDIR /app/setup
COPY setup/entrypoint.sh ./
COPY setup/config.ini ./config.ini
RUN chmod +x ./entrypoint.sh \
&& npm init -y \
&& npm install pg-boss \
&& node -e "const fs=require('fs');const pkg=require('./package.json');pkg.type='module';fs.writeFileSync('package.json',JSON.stringify(pkg,null,2))"
# 9) Environment defaults expected by scripts (can be overridden)
ENV APP_ENV=development \
NODE_ENV=development \
DB_NAME_SERVER=server \
DB_USER_SERVER=app_user \
DB_USER_ADMIN=postgres \
DB_HOST=postgres \
DB_PORT=5432
ENTRYPOINT ["./entrypoint.sh"]