diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml new file mode 100644 index 0000000..9b0c3b6 --- /dev/null +++ b/.forgejo/workflows/deploy.yml @@ -0,0 +1,21 @@ +name: Deploy + +on: + push: + branches: [staging] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Pull latest code + run: | + cd /opt/church-website/repo + git fetch origin staging + git reset --hard origin/staging + + - name: Deploy staging environment + run: /opt/church-website/scripts/deploy.sh staging 3001 + + - name: Deploy test environment + run: /opt/church-website/scripts/deploy.sh test 3002 diff --git a/Dockerfile b/Dockerfile index abf572b..725e0fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,6 +22,11 @@ WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . +ARG NEXT_PUBLIC_SERVER_URL +ARG NEXT_PUBLIC_SITE_ID +ENV NEXT_PUBLIC_SERVER_URL=$NEXT_PUBLIC_SERVER_URL +ENV NEXT_PUBLIC_SITE_ID=$NEXT_PUBLIC_SITE_ID + # Next.js collects completely anonymous telemetry data about general usage. # Learn more here: https://nextjs.org/telemetry # Uncomment the following line in case you want to disable telemetry during the build. diff --git a/docker-compose.yml b/docker-compose.yml index 3aba7cc..5bd0bab 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,43 +1,19 @@ -version: '3' - services: - payload: - image: node:18-alpine + postgres: + image: postgis/postgis:16-3.4 ports: - - '3000:3000' + - '5432:5432' volumes: - - .:/home/node/app - - node_modules:/home/node/app/node_modules - working_dir: /home/node/app/ - command: sh -c "corepack enable && corepack prepare pnpm@latest --activate && pnpm install && pnpm dev" - depends_on: - - mongo - # - postgres - env_file: - - .env - - # Ensure your DATABASE_URI uses 'mongo' as the hostname ie. mongodb://mongo/my-db-name - mongo: - image: mongo:latest - ports: - - '27017:27017' - command: - - --storageEngine=wiredTiger - volumes: - - data:/data/db - logging: - driver: none - - # Uncomment the following to use postgres - # postgres: - # restart: always - # image: postgres:latest - # volumes: - # - pgdata:/var/lib/postgresql/data - # ports: - # - "5432:5432" + - pgdata:/var/lib/postgresql/data + environment: + POSTGRES_DB: church_website_dev + POSTGRES_USER: postgres + POSTGRES_PASSWORD: password + healthcheck: + test: ['CMD-SHELL', 'pg_isready -U postgres'] + interval: 5s + timeout: 5s + retries: 5 volumes: - data: - # pgdata: - node_modules: + pgdata: diff --git a/next.config.mjs b/next.config.mjs index 6bfa9db..4942e4a 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -4,6 +4,9 @@ import { withPayload } from '@payloadcms/next/withPayload' const nextConfig = { // Your Next.js config here output: 'standalone', + eslint: { + ignoreDuringBuilds: true, + }, images: { remotePatterns: [ {