Skip to content

Commit 156ec4a

Browse files
authored
V2 (#26)
1 parent 47eb677 commit 156ec4a

File tree

317 files changed

+17800
-588602
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

317 files changed

+17800
-588602
lines changed

.env.ci

Lines changed: 0 additions & 19 deletions
This file was deleted.

.env.development

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,15 @@
22
### DEV ###
33
############
44
# DB
5-
DATABASE_URL="postgres://admin:pass123@localhost:6500/cloudkit-db"
6-
DATA_PROXY="" # Only used in Prod builds
7-
8-
# REDIS
9-
REDIS_URL="redis://default:redispw@localhost:6379"
10-
REDIS_TOKEN="" # Only used in Prod builds
11-
12-
# Images: Cloudflare
5+
DATABASE_URL="postgres://admin:pass123@localhost:7500/cloudkit-db"
6+
RATE_LIMIT="ngDPzgdE2apsLdSXLLnQYjbgNkt8ODeX36mq1hnK3NcfmVYwvMrqqkKgHLHNcLdjkcjdaIK9yoAzx0NLf5GLPfYVHbcfWCt83aSet88kgxkAhySGBCwvVuJE4aSRKtOd"
7+
# Images with docker-compose for local development
8+
PUBLIC_IMAGE_API_URL="http://localhost:7501/image"
139
IMAGE_API_TOKEN="" # Only used in Prod builds
14-
IMAGE_API="http://localhost:6501/image"
15-
PUBLIC_IMAGE_DELIVERY="http://localhost:6501/image"
10+
IMAGE_API_ACCOUNT_IDENTIFIER="" # Only used in Prod builds
11+
1612

1713
IS_CI=false
1814

1915
# prisma seed variables
20-
SEED_DEV=true
16+
SEED_DEV=true

.env.example

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
### DEV ###
33
############
44
# DB
5-
DATABASE_URL="postgres://admin:pass123@localhost:6500/cloudkit-db"
5+
DATABASE_URL="postgres://admin:pass123@localhost:6500/sk-db"
66
DATA_PROXY="" # Only used in Prod builds
77

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

1212
# Images: Cloudflare
13-
IMAGE_API_TOKEN="" # Only used in Prod builds
14-
IMAGE_API="http://localhost:6501/image"
13+
PUBLIC_IMAGE_API_TOKEN="" # Only used in Prod builds
14+
PUBLIC_IMAGE_API="http://localhost:6501/image"
1515
PUBLIC_IMAGE_DELIVERY="http://localhost:6501/image"
1616

1717
IS_CI=false

.eslintignore

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1 @@
1-
.DS_Store
2-
node_modules
3-
/build
4-
/.svelte-kit
5-
/package
6-
.env
7-
.env.*
8-
!.env.example
9-
prisma/seed.js
10-
# Ignore files for PNPM, NPM and YARN
11-
pnpm-lock.yaml
12-
package-lock.json
13-
yarn.lock
14-
prisma
15-
db
16-
**/*.postcss
17-
*.MD
1+
packages/eslint-config

.github/workflows/MERGE_MASTER.yml

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,52 @@ on:
99
schedule:
1010
- cron: '0 5 * * *'
1111
env:
12-
DATABASE_URL: ${{ secrets.DATABASE_URL }}
13-
DIRECT_DATABASE_URL: ${{ secrets.DIRECT_DATABASE_URL }}
14-
REDIS_TOKEN: ${{ secrets.REDIS_TOKEN }}
15-
REDIS_URL: ${{ secrets.REDIS_URL }}
16-
IMAGE_API_TOKEN: ${{ secrets.IMAGE_API_TOKEN }}
17-
IMAGE_API: ${{ secrets.IMAGE_API }}
18-
PUBLIC_IMAGE_DELIVERY: ${{ secrets.PUBLIC_IMAGE_DELIVERY }}
19-
IS_CI: true
12+
DIRECT_DATABASE_URL: ${{secrets.DIRECT_DATABASE_URL}}
13+
DATABASE_URL: ${{secrets.DATABASE_URL}}
14+
PUBLIC_IMAGE_API_URL: ${{secrets.PUBLIC_IMAGE_API_URL}}
15+
IMAGE_API_TOKEN: ${{secrets.IMAGE_API_TOKEN}}
16+
IMAGE_API_ACCOUNT_IDENTIFIER: ${{secrets.IMAGE_API_ACCOUNT_IDENTIFIER}}
17+
IS_CI: ${{secrets.IS_CI}}
18+
ENVIRONMENT: ${{secrets.ENVIRONMENT}}
19+
CLOUDFLARE_ACCOUNT_ID: ${{secrets.CLOUDFLARE_ACCOUNT_ID}}
20+
CLOUDFLARE_API_TOKEN: ${{secrets.CLOUDFLARE_API_TOKEN}}
2021

2122
jobs:
22-
PUBLISH:
23-
name: Publish to Production
24-
environment: PRODUCTION
23+
INSTALL:
24+
name: Install Dependencies
2525
runs-on: ubuntu-latest
2626
steps:
2727
- uses: actions/checkout@v4
28-
- uses: pnpm/action-setup@v2
28+
- uses: pnpm/action-setup@v3
2929
with:
30-
version: 8.9.2
30+
version: 9.1.1
3131
- uses: actions/setup-node@v3
3232
with:
3333
node-version: '20'
34-
cache: 'pnpm'
34+
- uses: actions/cache@v3
35+
id: cache-pnpm
36+
with:
37+
path: ./node_modules
38+
key: ${{ runner.os }}-${{ hashFiles('./pnpm-lock.yaml', './prisma/dev.schema.prisma', './prisma/prod.schema.prisma') }}
3539
- name: Install
40+
if: steps.cache-pnpm.outputs.cache-hit != 'true'
3641
run: |
37-
pnpm install
42+
pnpm i --frozen-lockfile
43+
pnpm prisma:gen:ci
44+
PUBLISH:
45+
name: Publish to Production
46+
environment: PRODUCTION
47+
runs-on: ubuntu-latest
48+
needs: INSTALL
49+
steps:
50+
- uses: actions/checkout@v4
51+
- uses: pnpm/action-setup@v3
52+
with:
53+
version: 9.1.1
54+
- uses: actions/cache@v3
55+
with:
56+
path: ./node_modules
57+
key: ${{ runner.os }}-${{ hashFiles('./pnpm-lock.yaml', './prisma/dev.schema.prisma', './prisma/prod.schema.prisma') }}
3858
- name: Build
3959
env:
4060
IS_CI: false
@@ -48,7 +68,6 @@ jobs:
4868
projectName: cloudkit
4969
directory: ./.svelte-kit/cloudflare
5070
# Optional: Enable this if you want to have GitHub Deployments triggered
51-
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
5271
# Optional: Switch what branch you are publishing to.
5372
# By default this will be the branch which triggered this workflow
5473
# branch: master

0 commit comments

Comments
 (0)