From e7332786e386fd4141ff890f7ec47b469748a8b0 Mon Sep 17 00:00:00 2001 From: Demis Bellot Date: Tue, 15 Oct 2024 11:58:06 +0800 Subject: [PATCH 1/4] Update tailwind.input.css --- CreatorKit/tailwind.input.css | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/CreatorKit/tailwind.input.css b/CreatorKit/tailwind.input.css index 3e1fb02..99ee608 100644 --- a/CreatorKit/tailwind.input.css +++ b/CreatorKit/tailwind.input.css @@ -1,16 +1,16 @@ @tailwind base; @tailwind components; +/* override element defaults */ +b, strong { font-weight:600; } + /*vue*/ [v-cloak] {display:none} -/* override element defaults */ -b { font-weight:600; } - /* @tailwindcss/forms css */ -[type='text'],[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[multiple],textarea,select +[type='text'],[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='week'],[type='search'],[type='tel'],[type='time'],[type='color'],[multiple],textarea,select {-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:0.5rem 0.75rem;font-size:1rem;line-height:1.5rem} -[type='text']:focus,[type='email']:focus,[type='url']:focus,[type='password']:focus,[type='number']:focus,[type='date']:focus,[type='datetime-local']:focus,[type='month']:focus,[type='search']:focus,[type='tel']:focus,[type='time']:focus,[multiple]:focus,textarea:focus,select:focus{ +[type='text']:focus,[type='email']:focus,[type='url']:focus,[type='password']:focus,[type='number']:focus,[type='date']:focus,[type='datetime-local']:focus,[type='month']:focus,[type='week']:focus,[type='search']:focus,[type='tel']:focus,[type='time']:focus,[type='color']:focus,[multiple]:focus,textarea:focus,select:focus{ outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/); --tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb; --tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); @@ -50,7 +50,8 @@ select{ [type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus{border-color:transparent;background-color:currentColor} [type='file']{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit} [type='file']:focus{outline:1px auto -webkit-focus-ring-color;} - +[type='color']{height:2.4rem;padding:2px 3px} +[type='range']{height:2.4rem} /* dark mode autocomplete fields */ .dark input:-webkit-autofill, @@ -83,4 +84,8 @@ select{ left: 0; } +[role=dialog].z-10 { + z-index: 60; +} + @tailwind utilities; \ No newline at end of file From be2f5f454c76e7191a47ca85664082ff46e0f116 Mon Sep 17 00:00:00 2001 From: Darren Reid Date: Tue, 3 Dec 2024 13:48:01 +1100 Subject: [PATCH 2/4] Migrate to Kamal --- .github/workflows/release.yml | 4 +++- .kamal/secrets | 2 ++ CreatorKit/CreatorKit.csproj | 2 +- config/deploy.yml | 28 ++++++++++++++-------------- config/litestream.yml | 18 ++++++++++++++++++ 5 files changed, 38 insertions(+), 16 deletions(-) create mode 100644 config/litestream.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1e856d1..8a0dbd7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,6 +16,8 @@ env: DOCKER_BUILDKIT: 1 KAMAL_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KAMAL_REGISTRY_USERNAME: ${{ github.actor }} + R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }} + R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} jobs: release: @@ -105,4 +107,4 @@ jobs: - name: Deploy with Kamal run: | kamal lock release -v - kamal deploy -P --version latest \ No newline at end of file + kamal deploy -P --version latest diff --git a/.kamal/secrets b/.kamal/secrets index 690aa96..84edb1d 100644 --- a/.kamal/secrets +++ b/.kamal/secrets @@ -5,6 +5,8 @@ # Option 1: Read secrets from the environment KAMAL_REGISTRY_PASSWORD=$KAMAL_REGISTRY_PASSWORD KAMAL_REGISTRY_USERNAME=$KAMAL_REGISTRY_USERNAME +R2_ACCESS_KEY_ID=$R2_ACCESS_KEY_ID +R2_SECRET_ACCESS_KEY=$R2_SECRET_ACCESS_KEY # Option 2: Read secrets via a command # RAILS_MASTER_KEY=$(cat config/master.key) diff --git a/CreatorKit/CreatorKit.csproj b/CreatorKit/CreatorKit.csproj index 8a3de72..5a10bf8 100644 --- a/CreatorKit/CreatorKit.csproj +++ b/CreatorKit/CreatorKit.csproj @@ -12,7 +12,7 @@ - + diff --git a/config/deploy.yml b/config/deploy.yml index f933b58..6a682f4 100644 --- a/config/deploy.yml +++ b/config/deploy.yml @@ -1,8 +1,8 @@ # Name of your application. Used to uniquely configure containers. -service: creatorkit +service: creatorkit.servicestack.net # Name of the container image. -image: netcoreapps/creatorkit +image: servicestack/creatorkit # Required for use of ASP.NET Core with Kamal-Proxy. env: @@ -21,7 +21,7 @@ servers: # in Cloudflare's SSL/TLS setting to "Full" to enable end-to-end encryption. proxy: ssl: true - host: creatorkit.netcore.io + host: creatorkit.servicestack.net # kamal-proxy connects to your container over port 80, use `app_port` to specify a different port. app_port: 8080 @@ -43,14 +43,14 @@ builder: volumes: - "/opt/docker/CreatorKit/App_Data:/app/App_Data" -#accessories: -# litestream: -# roles: ["web"] -# image: litestream/litestream -# files: ["config/litestream.yml:/etc/litestream.yml"] -# volumes: ["/opt/docker/CreatorKit/App_Data:/data"] -# cmd: replicate -# env: -# secret: -# - ACCESS_KEY_ID -# - SECRET_ACCESS_KEY +accessories: + litestream: + roles: ["web"] + image: litestream/litestream + files: ["config/litestream.yml:/etc/litestream.yml"] + volumes: ["/opt/docker/CreatorKit/App_Data:/data"] + cmd: replicate + env: + secret: + - R2_ACCESS_KEY_ID + - R2_SECRET_ACCESS_KEY diff --git a/config/litestream.yml b/config/litestream.yml new file mode 100644 index 0000000..2f182bb --- /dev/null +++ b/config/litestream.yml @@ -0,0 +1,18 @@ +access-key-id: $R2_ACCESS_KEY_ID +secret-access-key: $R2_SECRET_ACCESS_KEY + +dbs: + - path: /data/db.sqlite + replicas: + - type: s3 + bucket: creator-kit-prod + path: db.sqlite + region: auto + endpoint: https://b95f38ca3a6ac31ea582cd624e6eb385.r2.cloudflarestorage.com + + + + + + + From 3998ba412dcd50c6b3b0e04fe190cd976a301983 Mon Sep 17 00:00:00 2001 From: Darren Reid Date: Tue, 3 Dec 2024 13:53:32 +1100 Subject: [PATCH 3/4] Fix service name --- CreatorKit/CreatorKit.csproj | 2 +- config/deploy.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CreatorKit/CreatorKit.csproj b/CreatorKit/CreatorKit.csproj index 5a10bf8..2d092d0 100644 --- a/CreatorKit/CreatorKit.csproj +++ b/CreatorKit/CreatorKit.csproj @@ -12,7 +12,7 @@ - + diff --git a/config/deploy.yml b/config/deploy.yml index 6a682f4..a64bca7 100644 --- a/config/deploy.yml +++ b/config/deploy.yml @@ -1,5 +1,5 @@ # Name of your application. Used to uniquely configure containers. -service: creatorkit.servicestack.net +service: creatorkit-servicestack-net # Name of the container image. image: servicestack/creatorkit From 2a46104f53135aa4e9cc060455787af5f9857c76 Mon Sep 17 00:00:00 2001 From: Darren Reid Date: Tue, 3 Dec 2024 14:19:45 +1100 Subject: [PATCH 4/4] Update litestream path --- config/litestream.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/litestream.yml b/config/litestream.yml index 2f182bb..1b3ecec 100644 --- a/config/litestream.yml +++ b/config/litestream.yml @@ -2,11 +2,11 @@ access-key-id: $R2_ACCESS_KEY_ID secret-access-key: $R2_SECRET_ACCESS_KEY dbs: - - path: /data/db.sqlite + - path: /data/app.db replicas: - type: s3 bucket: creator-kit-prod - path: db.sqlite + path: app.db region: auto endpoint: https://b95f38ca3a6ac31ea582cd624e6eb385.r2.cloudflarestorage.com