This commit is contained in:
parent
eafda90a41
commit
cbdec5e61a
4 changed files with 43 additions and 38 deletions
21
.forgejo/workflows/deploy.yml
Normal file
21
.forgejo/workflows/deploy.yml
Normal file
|
|
@ -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
|
||||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@ import { withPayload } from '@payloadcms/next/withPayload'
|
|||
const nextConfig = {
|
||||
// Your Next.js config here
|
||||
output: 'standalone',
|
||||
eslint: {
|
||||
ignoreDuringBuilds: true,
|
||||
},
|
||||
images: {
|
||||
remotePatterns: [
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue