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
|
arch: amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Build project
|
|
||||||
image: node:18
|
|
||||||
commands:
|
|
||||||
- yarn
|
|
||||||
- yarn build
|
|
||||||
|
|
||||||
- name: Lint project
|
- name: Lint project
|
||||||
image: node:18
|
image: node:18
|
||||||
commands:
|
commands:
|
||||||
- yarn
|
- yarn
|
||||||
- yarn lint
|
- yarn lint
|
||||||
|
|
||||||
|
- name: Build project
|
||||||
|
image: node:18
|
||||||
|
commands:
|
||||||
|
- yarn
|
||||||
|
- yarn build
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: Compile docker image
|
name: Compile & publish docker image
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
os: linux
|
os: linux
|
||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Build
|
- name: Publish docker image
|
||||||
image: node:18
|
image: plugins/docker
|
||||||
commands:
|
settings:
|
||||||
- yarn
|
registry: ghcr.io
|
||||||
- yarn build
|
repo: ghcr.io/kevinmidboe/planetposen-frontend
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
username:
|
||||||
|
from_secret: GITHUB_USERNAME
|
||||||
|
password:
|
||||||
|
from_secret: GITHUB_PASSWORD
|
||||||
|
tags: latest
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- Lint and build project
|
- Lint and build project
|
||||||
@@ -42,12 +48,15 @@ depends_on:
|
|||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
|
- ci/ghcr-publish
|
||||||
event:
|
event:
|
||||||
|
include:
|
||||||
|
- push
|
||||||
exclude:
|
exclude:
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: 84765f19d995d66f1d3409c4eddd1f68d1f2d297d65cd9e2612e6bb13e8ecb94
|
hmac: 2578e80da0b7719a6d85be93b4a86803159ba7f320707607df9b579979c66e39
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -9,4 +9,4 @@ node_modules
|
|||||||
.vercel
|
.vercel
|
||||||
.output
|
.output
|
||||||
build
|
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"
|
"format": "prettier --plugin-search-dir . --write src"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@sveltejs/adapter-node": "^1.2.3",
|
||||||
"@sveltejs/adapter-static": "1.0.0",
|
"@sveltejs/adapter-static": "1.0.0",
|
||||||
"@sveltejs/kit": "1.0.1",
|
"@sveltejs/kit": "1.0.1",
|
||||||
"@types/cookie": "0.5.1",
|
"@types/cookie": "0.5.1",
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
|
import adapter from '@sveltejs/adapter-node';
|
||||||
import preprocess from 'svelte-preprocess';
|
import preprocess from 'svelte-preprocess';
|
||||||
|
|
||||||
/** @type {import('@sveltejs/kit').Config} */
|
/** @type {import('@sveltejs/kit').Config} */
|
||||||
const config = {
|
const config = {
|
||||||
// Consult https://github.com/sveltejs/svelte-preprocess
|
// Consult https://github.com/sveltejs/svelte-preprocess
|
||||||
// for more information about preprocessors
|
// for more information about preprocessors
|
||||||
preprocess: preprocess(),
|
preprocess: preprocess(),
|
||||||
|
|
||||||
kit: {
|
kit: {
|
||||||
csrf: {
|
adapter: adapter({
|
||||||
checkOrigin: false
|
out: 'build',
|
||||||
}
|
preprocess: false
|
||||||
}
|
}),
|
||||||
|
csrf: {
|
||||||
|
checkOrigin: false
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default config;
|
export default config;
|
||||||
|
|||||||
Reference in New Issue
Block a user