Skip to content

Commit

Permalink
V2 (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
polaroidkidd authored Oct 31, 2024
1 parent 47eb677 commit 156ec4a
Show file tree
Hide file tree
Showing 317 changed files with 17,800 additions and 588,602 deletions.
19 changes: 0 additions & 19 deletions .env.ci

This file was deleted.

18 changes: 7 additions & 11 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@
### DEV ###
############
# DB
DATABASE_URL="postgres://admin:pass123@localhost:6500/cloudkit-db"
DATA_PROXY="" # Only used in Prod builds

# REDIS
REDIS_URL="redis://default:redispw@localhost:6379"
REDIS_TOKEN="" # Only used in Prod builds

# Images: Cloudflare
DATABASE_URL="postgres://admin:pass123@localhost:7500/cloudkit-db"
RATE_LIMIT="ngDPzgdE2apsLdSXLLnQYjbgNkt8ODeX36mq1hnK3NcfmVYwvMrqqkKgHLHNcLdjkcjdaIK9yoAzx0NLf5GLPfYVHbcfWCt83aSet88kgxkAhySGBCwvVuJE4aSRKtOd"
# Images with docker-compose for local development
PUBLIC_IMAGE_API_URL="http://localhost:7501/image"
IMAGE_API_TOKEN="" # Only used in Prod builds
IMAGE_API="http://localhost:6501/image"
PUBLIC_IMAGE_DELIVERY="http://localhost:6501/image"
IMAGE_API_ACCOUNT_IDENTIFIER="" # Only used in Prod builds


IS_CI=false

# prisma seed variables
SEED_DEV=true
SEED_DEV=true
6 changes: 3 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
### DEV ###
############
# DB
DATABASE_URL="postgres://admin:pass123@localhost:6500/cloudkit-db"
DATABASE_URL="postgres://admin:pass123@localhost:6500/sk-db"
DATA_PROXY="" # Only used in Prod builds

# REDIS
REDIS_URL="redis://default:redispw@localhost:6379"
REDIS_TOKEN="" # Only used in Prod builds

# Images: Cloudflare
IMAGE_API_TOKEN="" # Only used in Prod builds
IMAGE_API="http://localhost:6501/image"
PUBLIC_IMAGE_API_TOKEN="" # Only used in Prod builds
PUBLIC_IMAGE_API="http://localhost:6501/image"
PUBLIC_IMAGE_DELIVERY="http://localhost:6501/image"

IS_CI=false
Expand Down
18 changes: 1 addition & 17 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,17 +1 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
prisma/seed.js
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
prisma
db
**/*.postcss
*.MD
packages/eslint-config
51 changes: 35 additions & 16 deletions .github/workflows/MERGE_MASTER.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,52 @@ on:
schedule:
- cron: '0 5 * * *'
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
DIRECT_DATABASE_URL: ${{ secrets.DIRECT_DATABASE_URL }}
REDIS_TOKEN: ${{ secrets.REDIS_TOKEN }}
REDIS_URL: ${{ secrets.REDIS_URL }}
IMAGE_API_TOKEN: ${{ secrets.IMAGE_API_TOKEN }}
IMAGE_API: ${{ secrets.IMAGE_API }}
PUBLIC_IMAGE_DELIVERY: ${{ secrets.PUBLIC_IMAGE_DELIVERY }}
IS_CI: true
DIRECT_DATABASE_URL: ${{secrets.DIRECT_DATABASE_URL}}
DATABASE_URL: ${{secrets.DATABASE_URL}}
PUBLIC_IMAGE_API_URL: ${{secrets.PUBLIC_IMAGE_API_URL}}
IMAGE_API_TOKEN: ${{secrets.IMAGE_API_TOKEN}}
IMAGE_API_ACCOUNT_IDENTIFIER: ${{secrets.IMAGE_API_ACCOUNT_IDENTIFIER}}
IS_CI: ${{secrets.IS_CI}}
ENVIRONMENT: ${{secrets.ENVIRONMENT}}
CLOUDFLARE_ACCOUNT_ID: ${{secrets.CLOUDFLARE_ACCOUNT_ID}}
CLOUDFLARE_API_TOKEN: ${{secrets.CLOUDFLARE_API_TOKEN}}

jobs:
PUBLISH:
name: Publish to Production
environment: PRODUCTION
INSTALL:
name: Install Dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v3
with:
version: 8.9.2
version: 9.1.1
- uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'pnpm'
- uses: actions/cache@v3
id: cache-pnpm
with:
path: ./node_modules
key: ${{ runner.os }}-${{ hashFiles('./pnpm-lock.yaml', './prisma/dev.schema.prisma', './prisma/prod.schema.prisma') }}
- name: Install
if: steps.cache-pnpm.outputs.cache-hit != 'true'
run: |
pnpm install
pnpm i --frozen-lockfile
pnpm prisma:gen:ci
PUBLISH:
name: Publish to Production
environment: PRODUCTION
runs-on: ubuntu-latest
needs: INSTALL
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 9.1.1
- uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ runner.os }}-${{ hashFiles('./pnpm-lock.yaml', './prisma/dev.schema.prisma', './prisma/prod.schema.prisma') }}
- name: Build
env:
IS_CI: false
Expand All @@ -48,7 +68,6 @@ jobs:
projectName: cloudkit
directory: ./.svelte-kit/cloudflare
# Optional: Enable this if you want to have GitHub Deployments triggered
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
# Optional: Switch what branch you are publishing to.
# By default this will be the branch which triggered this workflow
# branch: master
Expand Down
Loading

0 comments on commit 156ec4a

Please sign in to comment.