feat: versioned docker images

This commit is contained in:
dicedtomato 2022-07-13 04:32:52 +00:00 committed by GitHub
parent 54158c5dbe
commit cdf0f6e96c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 190 additions and 184 deletions

View file

@ -3,7 +3,7 @@
# if using s3/swift make sure to comment out the other datasources
CORE_SECURE=true
CORE_HTTPS=true
CORE_SECRET="changethis"
CORE_HOST=0.0.0.0
CORE_PORT=3000

View file

@ -1,4 +1,4 @@
name: 'CI: Build'
name: 'Build'
on:
push:
@ -22,12 +22,11 @@ jobs:
path: node_modules
key: ${{ runner.os }}-node${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
- name: Create mock config
run: echo -e "[core]\nsecret = '12345678'\ndatabase_url = 'postgres://postgres:postgres@postgres/postgres'\n[uploader]\nroute = '/u'\ndirectory = './uploads'\n[urls]\nroute = '/go'" > config.toml
- name: Install dependencies
if: steps.cache-restore.outputs.cache-hit != 'true'
run: yarn install
- name: Build
run: yarn build
env:
ZIPLINE_DOCKER_BUILD: true

50
.github/workflows/docker-release.yml vendored Normal file
View file

@ -0,0 +1,50 @@
name: 'Push Release Docker Images'
on:
push:
tags:
- 'v*.*.*'
paths:
- 'src/**'
- 'server/**'
- 'prisma/**'
- '.github/**'
- 'Dockerfile'
workflow_dispatch:
jobs:
push_to_ghcr:
name: Push Release Image to GitHub Packages
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Get version
uses: sergeysova/jq-action@v2
id: version
with:
cmd: 'jq .version package.json -r'
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Login to Github Packages
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker Image
uses: docker/build-push-action@v2
with:
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/diced/zipline:latest
ghcr.io/diced/zipline:${{ steps.version.outputs.value }}

View file

@ -1,4 +1,4 @@
name: 'CD: Push Docker Images'
name: 'Push Docker Images'
on:
push:
@ -33,17 +33,10 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Docker Image
uses: docker/build-push-action@v2
with:
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/diced/zipline/zipline:trunk
diced/zipline:trunk
ghcr.io/diced/zipline:trunk

View file

@ -23,21 +23,12 @@ services:
- '3000:3000'
restart: unless-stopped
environment:
- SECURE=false
- SECRET=changethis
- HOST=0.0.0.0
- PORT=3000
- DATASOURCE_TYPE=local
- DATASOURCE_LOCAL_DIRECTORY=./uploads
- DATABASE_URL=postgresql://postgres:postgres@postgres/postgres/
- UPLOADER_ROUTE=/u
- UPLOADER_EMBED_ROUTE=/a
- UPLOADER_LENGTH=6
- UPLOADER_ADMIN_LIMIT=104900000
- UPLOADER_USER_LIMIT=104900000
- UPLOADER_DISABLED_EXTS=
- URLS_ROUTE=/go
- URLS_LENGTH=6
- CORE_HTTPS=false
- CORE_SECRET=changethis
- CORE_HOST=0.0.0.0
- CORE_PORT=3000
- CORE_DATABASE_URL=postgres://postgres:postgres@postgres/postgres
- CORE_LOGGER=true
volumes:
- '$PWD/uploads:/zipline/uploads'
- '$PWD/public:/zipline/public'

View file

@ -16,28 +16,19 @@ services:
retries: 5
zipline:
image: ghcr.io/diced/zipline/zipline:trunk
image: ghcr.io/diced/zipline
ports:
- '3000:3000'
restart: always
environment:
- SECURE=false
- SECRET=changethis
- HOST=0.0.0.0
- PORT=3000
- DATASOURCE_TYPE=local
- DATASOURCE_DIRECTORY=./uploads
- DATABASE_URL=postgresql://postgres:postgres@postgres/postgres/
- UPLOADER_ROUTE=/u
- UPLOADER_EMBED_ROUTE=/a
- UPLOADER_LENGTH=6
- UPLOADER_ADMIN_LIMIT=104900000
- UPLOADER_USER_LIMIT=104900000
- UPLOADER_DISABLED_EXTS=
- URLS_ROUTE=/go
- URLS_LENGTH=6
- CORE_HTTPS=false
- CORE_SECRET=changethis
- CORE_HOST=0.0.0.0
- CORE_PORT=3000
- CORE_DATABASE_URL=postgres://postgres:postgres@postgres/postgres
- CORE_LOGGER=true
volumes:
- '$PWD/uploads:/zipline/uploads'
- './uploads:/zipline/uploads'
- '$PWD/public:/zipline/public'
depends_on:
- 'postgres'

View file

@ -31,7 +31,6 @@
"argon2": "^0.28.5",
"colorette": "^2.0.19",
"cookie": "^0.5.0",
"dot-prop": "^7.2.0",
"dotenv": "^16.0.1",
"dotenv-expand": "^8.0.3",
"fecha": "^4.2.3",

255
yarn.lock
View file

@ -1368,9 +1368,9 @@ __metadata:
linkType: hard
"@types/geojson@npm:^7946.0.8":
version: 7946.0.8
resolution: "@types/geojson@npm:7946.0.8"
checksum: 6049a39b025cfe323d5cf87333d87c133ec963cdbd349c49295bee779827ee4b46a3041fd8bd2e7a4b02d6d1e26f3002968875928941bbed08477bfd5f6f9284
version: 7946.0.9
resolution: "@types/geojson@npm:7946.0.9"
checksum: b858f06a27f4c11dbf441a7ea710a27563ebdd5a0326daee5869b0483a39642a19f39b0f415518e981278f911470f9275b99d86b9ede5d7b19a64c32a14cd36e
languageName: node
linkType: hard
@ -1541,45 +1541,45 @@ __metadata:
linkType: hard
"@typescript-eslint/parser@npm:^5.21.0":
version: 5.30.5
resolution: "@typescript-eslint/parser@npm:5.30.5"
version: 5.30.6
resolution: "@typescript-eslint/parser@npm:5.30.6"
dependencies:
"@typescript-eslint/scope-manager": 5.30.5
"@typescript-eslint/types": 5.30.5
"@typescript-eslint/typescript-estree": 5.30.5
"@typescript-eslint/scope-manager": 5.30.6
"@typescript-eslint/types": 5.30.6
"@typescript-eslint/typescript-estree": 5.30.6
debug: ^4.3.4
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 6c16821e122b891420a538f200f6e576ad1167855a67e87f9a7d3a08c0513fe26006f6411b8ba6f4662a81526bd0339ae37c47dd88fa5943e6f27ff70da9f989
checksum: 3e02bb447d21af65adefbaddb46380ced3fb88045ef2e122d6522cc354d414898cd2222b4ce05fa0ee1fbc8c01e9a7833fe57e52b844e3fba30c89d20e006b56
languageName: node
linkType: hard
"@typescript-eslint/scope-manager@npm:5.30.5":
version: 5.30.5
resolution: "@typescript-eslint/scope-manager@npm:5.30.5"
"@typescript-eslint/scope-manager@npm:5.30.6":
version: 5.30.6
resolution: "@typescript-eslint/scope-manager@npm:5.30.6"
dependencies:
"@typescript-eslint/types": 5.30.5
"@typescript-eslint/visitor-keys": 5.30.5
checksum: 509bee6d62cca1716e8f4792d9180c189974992ba13d8103ca04423a64006cf184c4b2c606d55c776305458140c798a3a9a414d07a60790b83dd714f56c457b0
"@typescript-eslint/types": 5.30.6
"@typescript-eslint/visitor-keys": 5.30.6
checksum: 454c32339869694a400c6e3e4e44729da3c02359cb086c1e9315e2aeb93af3a6e1c87d274f9eb0066a081f99e4ffda3a036565d17c78dd8649d19f18199419c6
languageName: node
linkType: hard
"@typescript-eslint/types@npm:5.30.5":
version: 5.30.5
resolution: "@typescript-eslint/types@npm:5.30.5"
checksum: c70420618cb875d4e964a20a3fa4cf40cb97a8ad3123e24860e3d829edf3b081c77fa1fe25644700499d27e44aee5783abc7765deee61e2ef59a928db96b2175
"@typescript-eslint/types@npm:5.30.6":
version: 5.30.6
resolution: "@typescript-eslint/types@npm:5.30.6"
checksum: 47c621dae5929d5b39b2b27c6f2ecb8daab1da22566867443873c0681322019f99e205629910bfe04e64077349aec05c84e0d4571f189619b609f4173a9d0f36
languageName: node
linkType: hard
"@typescript-eslint/typescript-estree@npm:5.30.5":
version: 5.30.5
resolution: "@typescript-eslint/typescript-estree@npm:5.30.5"
"@typescript-eslint/typescript-estree@npm:5.30.6":
version: 5.30.6
resolution: "@typescript-eslint/typescript-estree@npm:5.30.6"
dependencies:
"@typescript-eslint/types": 5.30.5
"@typescript-eslint/visitor-keys": 5.30.5
"@typescript-eslint/types": 5.30.6
"@typescript-eslint/visitor-keys": 5.30.6
debug: ^4.3.4
globby: ^11.1.0
is-glob: ^4.0.3
@ -1588,17 +1588,17 @@ __metadata:
peerDependenciesMeta:
typescript:
optional: true
checksum: 19dce426c826cddd4aadf2fa15be943c6ad7d2038685cc2665749486a5f44a47819aab5d260b54f8a4babf6acf2500e9f62e709d61fce337b12d5468ff285277
checksum: 5621c03f1a6ca8866d91014cd30b53a37f9c4d664eb97bc2740294bcbf7efc0178e8699def752b86c97472e7b1b0cd9b6c0d9aa07a04decfe78bd16c21f93c4b
languageName: node
linkType: hard
"@typescript-eslint/visitor-keys@npm:5.30.5":
version: 5.30.5
resolution: "@typescript-eslint/visitor-keys@npm:5.30.5"
"@typescript-eslint/visitor-keys@npm:5.30.6":
version: 5.30.6
resolution: "@typescript-eslint/visitor-keys@npm:5.30.6"
dependencies:
"@typescript-eslint/types": 5.30.5
"@typescript-eslint/types": 5.30.6
eslint-visitor-keys: ^3.3.0
checksum: c0de9ae48378eec2682b860a059518bed213ea29575aad538d8d2f8137875e7279e375a7f23d38c1c183466fdd9cf1ca1db4ed5a1d374968f9460d83e48b2437
checksum: e4ec0541d685d211274724c9f1887b6cdd03c7fc4fbdd1ea74c18311c3a5a9a2d4c676448ea714687ca13cc881ec5c73605de75fbf38f302ba8ea86d2b77897f
languageName: node
linkType: hard
@ -2257,9 +2257,9 @@ __metadata:
linkType: hard
"caniuse-lite@npm:^1.0.30001332":
version: 1.0.30001363
resolution: "caniuse-lite@npm:1.0.30001363"
checksum: 8dfcb2fa97724349cbbe61d988810bd90bfb40106a289ed6613188fa96dd1f5885c7e9924e46bb30a641bd1579ec34096fdc2b21b47d8500f8a2bfb0db069323
version: 1.0.30001365
resolution: "caniuse-lite@npm:1.0.30001365"
checksum: 5d043006e9bd9de1ae06c0e12c31997f0ed26f889f47ea6403dc2d08f46a5bd4bf0fe1a5b1099561fc447201ddf13083f277de68829e77fd238ff2af8c05e0a6
languageName: node
linkType: hard
@ -2874,15 +2874,6 @@ __metadata:
languageName: node
linkType: hard
"dot-prop@npm:^7.2.0":
version: 7.2.0
resolution: "dot-prop@npm:7.2.0"
dependencies:
type-fest: ^2.11.2
checksum: 08e4ff14f7305ffb5fda7e4c88f3cdbeb3cd97bd27efa4f47503869a2ee7f96938b4c21b0a2abf9c37d891a1bdb3994a09d219b0dcfd6130da4eaeb44c6f067e
languageName: node
linkType: hard
"dotenv-expand@npm:^8.0.3":
version: 8.0.3
resolution: "dotenv-expand@npm:8.0.3"
@ -3074,170 +3065,170 @@ __metadata:
languageName: node
linkType: hard
"esbuild-android-64@npm:0.14.48":
version: 0.14.48
resolution: "esbuild-android-64@npm:0.14.48"
"esbuild-android-64@npm:0.14.49":
version: 0.14.49
resolution: "esbuild-android-64@npm:0.14.49"
conditions: os=android & cpu=x64
languageName: node
linkType: hard
"esbuild-android-arm64@npm:0.14.48":
version: 0.14.48
resolution: "esbuild-android-arm64@npm:0.14.48"
"esbuild-android-arm64@npm:0.14.49":
version: 0.14.49
resolution: "esbuild-android-arm64@npm:0.14.49"
conditions: os=android & cpu=arm64
languageName: node
linkType: hard
"esbuild-darwin-64@npm:0.14.48":
version: 0.14.48
resolution: "esbuild-darwin-64@npm:0.14.48"
"esbuild-darwin-64@npm:0.14.49":
version: 0.14.49
resolution: "esbuild-darwin-64@npm:0.14.49"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard
"esbuild-darwin-arm64@npm:0.14.48":
version: 0.14.48
resolution: "esbuild-darwin-arm64@npm:0.14.48"
"esbuild-darwin-arm64@npm:0.14.49":
version: 0.14.49
resolution: "esbuild-darwin-arm64@npm:0.14.49"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard
"esbuild-freebsd-64@npm:0.14.48":
version: 0.14.48
resolution: "esbuild-freebsd-64@npm:0.14.48"
"esbuild-freebsd-64@npm:0.14.49":
version: 0.14.49
resolution: "esbuild-freebsd-64@npm:0.14.49"
conditions: os=freebsd & cpu=x64
languageName: node
linkType: hard
"esbuild-freebsd-arm64@npm:0.14.48":
version: 0.14.48
resolution: "esbuild-freebsd-arm64@npm:0.14.48"
"esbuild-freebsd-arm64@npm:0.14.49":
version: 0.14.49
resolution: "esbuild-freebsd-arm64@npm:0.14.49"
conditions: os=freebsd & cpu=arm64
languageName: node
linkType: hard
"esbuild-linux-32@npm:0.14.48":
version: 0.14.48
resolution: "esbuild-linux-32@npm:0.14.48"
"esbuild-linux-32@npm:0.14.49":
version: 0.14.49
resolution: "esbuild-linux-32@npm:0.14.49"
conditions: os=linux & cpu=ia32
languageName: node
linkType: hard
"esbuild-linux-64@npm:0.14.48":
version: 0.14.48
resolution: "esbuild-linux-64@npm:0.14.48"
"esbuild-linux-64@npm:0.14.49":
version: 0.14.49
resolution: "esbuild-linux-64@npm:0.14.49"
conditions: os=linux & cpu=x64
languageName: node
linkType: hard
"esbuild-linux-arm64@npm:0.14.48":
version: 0.14.48
resolution: "esbuild-linux-arm64@npm:0.14.48"
"esbuild-linux-arm64@npm:0.14.49":
version: 0.14.49
resolution: "esbuild-linux-arm64@npm:0.14.49"
conditions: os=linux & cpu=arm64
languageName: node
linkType: hard
"esbuild-linux-arm@npm:0.14.48":
version: 0.14.48
resolution: "esbuild-linux-arm@npm:0.14.48"
"esbuild-linux-arm@npm:0.14.49":
version: 0.14.49
resolution: "esbuild-linux-arm@npm:0.14.49"
conditions: os=linux & cpu=arm
languageName: node
linkType: hard
"esbuild-linux-mips64le@npm:0.14.48":
version: 0.14.48
resolution: "esbuild-linux-mips64le@npm:0.14.48"
"esbuild-linux-mips64le@npm:0.14.49":
version: 0.14.49
resolution: "esbuild-linux-mips64le@npm:0.14.49"
conditions: os=linux & cpu=mips64el
languageName: node
linkType: hard
"esbuild-linux-ppc64le@npm:0.14.48":
version: 0.14.48
resolution: "esbuild-linux-ppc64le@npm:0.14.48"
"esbuild-linux-ppc64le@npm:0.14.49":
version: 0.14.49
resolution: "esbuild-linux-ppc64le@npm:0.14.49"
conditions: os=linux & cpu=ppc64
languageName: node
linkType: hard
"esbuild-linux-riscv64@npm:0.14.48":
version: 0.14.48
resolution: "esbuild-linux-riscv64@npm:0.14.48"
"esbuild-linux-riscv64@npm:0.14.49":
version: 0.14.49
resolution: "esbuild-linux-riscv64@npm:0.14.49"
conditions: os=linux & cpu=riscv64
languageName: node
linkType: hard
"esbuild-linux-s390x@npm:0.14.48":
version: 0.14.48
resolution: "esbuild-linux-s390x@npm:0.14.48"
"esbuild-linux-s390x@npm:0.14.49":
version: 0.14.49
resolution: "esbuild-linux-s390x@npm:0.14.49"
conditions: os=linux & cpu=s390x
languageName: node
linkType: hard
"esbuild-netbsd-64@npm:0.14.48":
version: 0.14.48
resolution: "esbuild-netbsd-64@npm:0.14.48"
"esbuild-netbsd-64@npm:0.14.49":
version: 0.14.49
resolution: "esbuild-netbsd-64@npm:0.14.49"
conditions: os=netbsd & cpu=x64
languageName: node
linkType: hard
"esbuild-openbsd-64@npm:0.14.48":
version: 0.14.48
resolution: "esbuild-openbsd-64@npm:0.14.48"
"esbuild-openbsd-64@npm:0.14.49":
version: 0.14.49
resolution: "esbuild-openbsd-64@npm:0.14.49"
conditions: os=openbsd & cpu=x64
languageName: node
linkType: hard
"esbuild-sunos-64@npm:0.14.48":
version: 0.14.48
resolution: "esbuild-sunos-64@npm:0.14.48"
"esbuild-sunos-64@npm:0.14.49":
version: 0.14.49
resolution: "esbuild-sunos-64@npm:0.14.49"
conditions: os=sunos & cpu=x64
languageName: node
linkType: hard
"esbuild-windows-32@npm:0.14.48":
version: 0.14.48
resolution: "esbuild-windows-32@npm:0.14.48"
"esbuild-windows-32@npm:0.14.49":
version: 0.14.49
resolution: "esbuild-windows-32@npm:0.14.49"
conditions: os=win32 & cpu=ia32
languageName: node
linkType: hard
"esbuild-windows-64@npm:0.14.48":
version: 0.14.48
resolution: "esbuild-windows-64@npm:0.14.48"
"esbuild-windows-64@npm:0.14.49":
version: 0.14.49
resolution: "esbuild-windows-64@npm:0.14.49"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard
"esbuild-windows-arm64@npm:0.14.48":
version: 0.14.48
resolution: "esbuild-windows-arm64@npm:0.14.48"
"esbuild-windows-arm64@npm:0.14.49":
version: 0.14.49
resolution: "esbuild-windows-arm64@npm:0.14.49"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard
"esbuild@npm:^0.14.44":
version: 0.14.48
resolution: "esbuild@npm:0.14.48"
version: 0.14.49
resolution: "esbuild@npm:0.14.49"
dependencies:
esbuild-android-64: 0.14.48
esbuild-android-arm64: 0.14.48
esbuild-darwin-64: 0.14.48
esbuild-darwin-arm64: 0.14.48
esbuild-freebsd-64: 0.14.48
esbuild-freebsd-arm64: 0.14.48
esbuild-linux-32: 0.14.48
esbuild-linux-64: 0.14.48
esbuild-linux-arm: 0.14.48
esbuild-linux-arm64: 0.14.48
esbuild-linux-mips64le: 0.14.48
esbuild-linux-ppc64le: 0.14.48
esbuild-linux-riscv64: 0.14.48
esbuild-linux-s390x: 0.14.48
esbuild-netbsd-64: 0.14.48
esbuild-openbsd-64: 0.14.48
esbuild-sunos-64: 0.14.48
esbuild-windows-32: 0.14.48
esbuild-windows-64: 0.14.48
esbuild-windows-arm64: 0.14.48
esbuild-android-64: 0.14.49
esbuild-android-arm64: 0.14.49
esbuild-darwin-64: 0.14.49
esbuild-darwin-arm64: 0.14.49
esbuild-freebsd-64: 0.14.49
esbuild-freebsd-arm64: 0.14.49
esbuild-linux-32: 0.14.49
esbuild-linux-64: 0.14.49
esbuild-linux-arm: 0.14.49
esbuild-linux-arm64: 0.14.49
esbuild-linux-mips64le: 0.14.49
esbuild-linux-ppc64le: 0.14.49
esbuild-linux-riscv64: 0.14.49
esbuild-linux-s390x: 0.14.49
esbuild-netbsd-64: 0.14.49
esbuild-openbsd-64: 0.14.49
esbuild-sunos-64: 0.14.49
esbuild-windows-32: 0.14.49
esbuild-windows-64: 0.14.49
esbuild-windows-arm64: 0.14.49
dependenciesMeta:
esbuild-android-64:
optional: true
@ -3281,7 +3272,7 @@ __metadata:
optional: true
bin:
esbuild: bin/esbuild
checksum: 352d5f5678b697eaafe0bb3374e3da013b31df98c2da17e94266f0bd9d421c531733df038d5b3548d1e8bc86daac0417f1ba2df1cc184685fdb899e1f309f47d
checksum: b718f4c9eaf2f83bb26f2cdb18d82d70365179ae8d1d88636afc3073a0c328364340695798b9a6322ae15e31b90e1f71266151f61637412649fb31bb3ecb2e0a
languageName: node
linkType: hard
@ -5119,9 +5110,9 @@ __metadata:
linkType: hard
"lru-cache@npm:^7.7.1":
version: 7.12.0
resolution: "lru-cache@npm:7.12.0"
checksum: fdb62262978393df7a4bd46a072bc5c3808c50ca5a347a82bb9459410efd841b7bae50655c3cf9004c70d12c756cf6d018f6bff155a16cdde9eba9a82899b5eb
version: 7.13.0
resolution: "lru-cache@npm:7.13.0"
checksum: 95a13e0f3691db9be3e78b597e347c2a4911f7303a514076dbc185b472683fa6e06dcaad74b5fc35fa1192c2cfe4b0bbaf3778b5066503eedd1b92bfec864c4c
languageName: node
linkType: hard
@ -7795,13 +7786,6 @@ __metadata:
languageName: node
linkType: hard
"type-fest@npm:^2.11.2":
version: 2.16.0
resolution: "type-fest@npm:2.16.0"
checksum: 897fc5f6833de5ade5c4841d034bdfb6aaa168f24f725354ad13320b2a463b9df03a7a664b836b4c3bc7d9f92b22a25c26fe24668a35caf3b7a9ea5fcb847b8d
languageName: node
linkType: hard
"type-is@npm:^1.6.4":
version: 1.6.18
resolution: "type-is@npm:1.6.18"
@ -8259,7 +8243,6 @@ __metadata:
babel-plugin-import: ^1.13.5
colorette: ^2.0.19
cookie: ^0.5.0
dot-prop: ^7.2.0
dotenv: ^16.0.1
dotenv-expand: ^8.0.3
esbuild: ^0.14.44