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 --from=deps /app/node_modules ./node_modules
|
||||||
COPY . .
|
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.
|
# Next.js collects completely anonymous telemetry data about general usage.
|
||||||
# Learn more here: https://nextjs.org/telemetry
|
# Learn more here: https://nextjs.org/telemetry
|
||||||
# Uncomment the following line in case you want to disable telemetry during the build.
|
# Uncomment the following line in case you want to disable telemetry during the build.
|
||||||
|
|
|
||||||
|
|
@ -1,43 +1,19 @@
|
||||||
version: '3'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
payload:
|
postgres:
|
||||||
image: node:18-alpine
|
image: postgis/postgis:16-3.4
|
||||||
ports:
|
ports:
|
||||||
- '3000:3000'
|
- '5432:5432'
|
||||||
volumes:
|
volumes:
|
||||||
- .:/home/node/app
|
- pgdata:/var/lib/postgresql/data
|
||||||
- node_modules:/home/node/app/node_modules
|
environment:
|
||||||
working_dir: /home/node/app/
|
POSTGRES_DB: church_website_dev
|
||||||
command: sh -c "corepack enable && corepack prepare pnpm@latest --activate && pnpm install && pnpm dev"
|
POSTGRES_USER: postgres
|
||||||
depends_on:
|
POSTGRES_PASSWORD: password
|
||||||
- mongo
|
healthcheck:
|
||||||
# - postgres
|
test: ['CMD-SHELL', 'pg_isready -U postgres']
|
||||||
env_file:
|
interval: 5s
|
||||||
- .env
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
# 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"
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
data:
|
pgdata:
|
||||||
# pgdata:
|
|
||||||
node_modules:
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,9 @@ import { withPayload } from '@payloadcms/next/withPayload'
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
// Your Next.js config here
|
// Your Next.js config here
|
||||||
output: 'standalone',
|
output: 'standalone',
|
||||||
|
eslint: {
|
||||||
|
ignoreDuringBuilds: true,
|
||||||
|
},
|
||||||
images: {
|
images: {
|
||||||
remotePatterns: [
|
remotePatterns: [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue