mirror of
https://github.com/KevinMidboe/planetposen-frontend.git
synced 2025-10-29 13:10:12 +00:00
Compare commits
5 Commits
71e053297e
...
ci/ghcr-pu
| Author | SHA1 | Date | |
|---|---|---|---|
| 475cfed06d | |||
| 4cc0403c0f | |||
| d7567b4242 | |||
| 6c35257f00 | |||
| bde055c79a |
35
.drone.yml
35
.drone.yml
@@ -8,33 +8,39 @@ platform:
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: Build project
|
||||
image: node:18
|
||||
commands:
|
||||
- yarn
|
||||
- yarn build
|
||||
|
||||
- name: Lint project
|
||||
image: node:18
|
||||
commands:
|
||||
- yarn
|
||||
- yarn lint
|
||||
|
||||
- name: Build project
|
||||
image: node:18
|
||||
commands:
|
||||
- yarn
|
||||
- yarn build
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: Compile docker image
|
||||
name: Compile & publish docker image
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: Build
|
||||
image: node:18
|
||||
commands:
|
||||
- yarn
|
||||
- yarn build
|
||||
- name: Publish docker image
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: ghcr.io
|
||||
repo: ghcr.io/kevinmidboe/planetposen-frontend
|
||||
dockerfile: Dockerfile
|
||||
username:
|
||||
from_secret: GITHUB_USERNAME
|
||||
password:
|
||||
from_secret: GITHUB_PASSWORD
|
||||
tags: latest
|
||||
|
||||
depends_on:
|
||||
- Lint and build project
|
||||
@@ -42,12 +48,15 @@ depends_on:
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
||||
- ci/ghcr-publish
|
||||
event:
|
||||
include:
|
||||
- push
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
---
|
||||
kind: signature
|
||||
hmac: 84765f19d995d66f1d3409c4eddd1f68d1f2d297d65cd9e2612e6bb13e8ecb94
|
||||
hmac: 2578e80da0b7719a6d85be93b4a86803159ba7f320707607df9b579979c66e39
|
||||
|
||||
...
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -9,4 +9,4 @@ node_modules
|
||||
.vercel
|
||||
.output
|
||||
build
|
||||
yarn.lock
|
||||
|
||||
|
||||
28
Dockerfile
Normal file
28
Dockerfile
Normal file
@@ -0,0 +1,28 @@
|
||||
# - - Build image
|
||||
FROM node:18-alpine AS BUILD_IMAGE
|
||||
|
||||
# Alpine package dependencies & emove cached files to reduce size
|
||||
RUN apk update && apk add python3 make g++ && rm -rf /var/cache/apk/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json yarn.lock ./
|
||||
RUN yarn --froze-lockfile
|
||||
|
||||
COPY . .
|
||||
|
||||
# Build application
|
||||
RUN yarn build
|
||||
|
||||
# - - Run image
|
||||
FROM node:18-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json ./
|
||||
COPY --from=BUILD_IMAGE /app/build ./build
|
||||
COPY --from=BUILD_IMAGE /app/node_modules ./node_modules
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["node", "build/index.js"]
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"format": "prettier --plugin-search-dir . --write src"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sveltejs/adapter-node": "^1.2.3",
|
||||
"@sveltejs/adapter-static": "1.0.0",
|
||||
"@sveltejs/kit": "1.0.1",
|
||||
"@types/cookie": "0.5.1",
|
||||
@@ -34,4 +35,4 @@
|
||||
"dependencies": {
|
||||
"@stripe/stripe-js": "1.46.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
import adapter from '@sveltejs/adapter-node';
|
||||
import preprocess from 'svelte-preprocess';
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
const config = {
|
||||
// Consult https://github.com/sveltejs/svelte-preprocess
|
||||
// for more information about preprocessors
|
||||
preprocess: preprocess(),
|
||||
// Consult https://github.com/sveltejs/svelte-preprocess
|
||||
// for more information about preprocessors
|
||||
preprocess: preprocess(),
|
||||
|
||||
kit: {
|
||||
csrf: {
|
||||
checkOrigin: false
|
||||
}
|
||||
}
|
||||
kit: {
|
||||
adapter: adapter({
|
||||
out: 'build',
|
||||
preprocess: false
|
||||
}),
|
||||
csrf: {
|
||||
checkOrigin: false
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
||||
Reference in New Issue
Block a user