Skip to content

Commit

Permalink
[site] migrate to SvelteKit (#6811)
Browse files Browse the repository at this point in the history
Co-authored-by: Conduitry <git@chor.date>
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
  • Loading branch information
3 people authored Oct 19, 2021
1 parent 883c47b commit 42076a7
Show file tree
Hide file tree
Showing 68 changed files with 3,248 additions and 7,461 deletions.
10 changes: 4 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@ _actual*.*
_output
/types

/site/cypress/screenshots/
/site/__sapper__/
/site/.svelte-kit/
/site/build/
/site/.env
/site/.sessions
/site/static/svelte-app.json
/site/static/contributors.jpg
/site/static/donors.jpg
/site/static/workers
/site/scripts/svelte-app
/site/scripts/community
/site/static/workers/
/site/scripts/svelte-app/
/site/src/routes/_contributors.js
/site/src/routes/_donors.js
4 changes: 1 addition & 3 deletions site/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
!/Dockerfile
!/package.json
!/package-lock.json
!/__sapper__
/__sapper__/*
!/__sapper__/build
!/build
!/static
!/content
10 changes: 5 additions & 5 deletions site/.env.example
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
NODE_ENV=

PORT=
BASEURL=
PORT=3000
BASEURL=http://localhost:3000
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
MAPBOX_ACCESS_TOKEN=
VITE_MAPBOX_ACCESS_TOKEN=

PGHOST=hostname
PGPORT=port
PGHOST=localhost
PGPORT=5432
PGUSER=username
PGPASSWORD=password
PGDATABASE=database_name
11 changes: 0 additions & 11 deletions site/.travis.yml

This file was deleted.

8 changes: 4 additions & 4 deletions site/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# IMPORTANT: Don't use this Dockerfile in your own Sapper projects without also looking at the .dockerignore file.
# IMPORTANT: Don't use this Dockerfile in your own projects without also looking at the .dockerignore file.
# Without an appropriate .dockerignore, this Dockerfile will copy a large number of unneeded files into your image.

FROM mhart/alpine-node:12
FROM mhart/alpine-node:14

# install dependencies
WORKDIR /app
Expand All @@ -12,11 +12,11 @@ RUN npm ci --production
# Only copy over the Node pieces we need
# ~> Saves 35MB
###
FROM mhart/alpine-node:slim-12
FROM mhart/alpine-node:slim-14

WORKDIR /app
COPY --from=0 /app .
COPY . .

EXPOSE 3000
CMD ["node", "__sapper__/build"]
CMD ["node", "build"]
6 changes: 3 additions & 3 deletions site/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ PROJECT := svelte-dev

IMAGE := gcr.io/$(PROJECT)/$(SERVICE):$(HASH)

sapper:
sveltekit:
@echo "\n~> updating template & contributors list"
@npm run update
@echo "\n~> building Sapper app"
@echo "\n~> building SvelteKit app"
@npm run build


Expand All @@ -17,6 +17,6 @@ docker:
@gcloud builds submit --project $(PROJECT) -t $(IMAGE)


deploy: sapper docker
deploy: sveltekit docker
@echo "\n~> deploying $(SERVICE) to Cloud Run servers"
@gcloud run deploy $(SERVICE) --project $(PROJECT) --allow-unauthenticated --platform managed --region us-central1 --image $(IMAGE) --memory=512Mi
2 changes: 1 addition & 1 deletion site/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ In order for the REPL's GitHub integration to work properly when running locally

## Building the site

To build the website, run `npm run build`. The output can be found in `__sapper__/build`.
To build the website, run `npm run build`. The output can be found in `build`.

## Testing

Expand Down
17 changes: 0 additions & 17 deletions site/appveyor.yml

This file was deleted.

15 changes: 15 additions & 0 deletions site/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: "3.0"
services:
postgres:
image: postgres:13.4
ports:
- "5432:5432"
environment:
- POSTGRES_DB=${PGDATABASE}
- POSTGRES_USER=${PGUSER}
- POSTGRES_PASSWORD=${PGPASSWORD}
adminer:
image: adminer
restart: always
ports:
- "4000:8080"
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 42076a7

Please sign in to comment.