Include contents of the zed-server repo
We're going full monorepo. Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
parent
34abda3a04
commit
1537500fcb
99 changed files with 7206 additions and 75 deletions
10
script/build-css
Executable file
10
script/build-css
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
cd ./script
|
||||
[ -d node_modules ] || npm install
|
||||
if [[ $1 == --release ]]; then
|
||||
export NODE_ENV=production # Purge unused styles in --release mode
|
||||
fi
|
||||
npx tailwindcss build ../server/styles.css --output ../server/static/styles.css
|
17
script/deploy
Executable file
17
script/deploy
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Prerequisites:
|
||||
#
|
||||
# - Log in to the DigitalOcean docker registry
|
||||
# doctl registry login
|
||||
#
|
||||
# - Set the default K8s context to production
|
||||
# doctl kubernetes cluster kubeconfig save zed-1
|
||||
|
||||
set -e
|
||||
|
||||
IMAGE_ID=registry.digitalocean.com/zed/zed-server
|
||||
|
||||
docker build . --tag $IMAGE_ID
|
||||
docker push $IMAGE_ID
|
||||
kubectl rollout restart deployment zed
|
11
script/deploy-migration
Executable file
11
script/deploy-migration
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
IMAGE_ID=registry.digitalocean.com/zed/zed-migrator
|
||||
|
||||
docker build . \
|
||||
--file ./Dockerfile.migrator \
|
||||
--tag $IMAGE_ID
|
||||
docker push $IMAGE_ID
|
||||
kubectl apply -f ./server/migrate.yml
|
2452
script/package-lock.json
generated
Normal file
2452
script/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
6
script/package.json
Normal file
6
script/package.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"devDependencies": {
|
||||
"@tailwindcss/typography": "^0.4.0",
|
||||
"tailwindcss-cli": "^0.1.2"
|
||||
}
|
||||
}
|
6
script/server
Executable file
6
script/server
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
cd server
|
||||
cargo run
|
12
script/sqlx
Executable file
12
script/sqlx
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Install sqlx-cli if needed
|
||||
[[ "$(sqlx --version)" == "sqlx-cli 0.5.5" ]] || cargo install sqlx-cli --version 0.5.5
|
||||
|
||||
# Export contents of .env.toml
|
||||
eval "$(cargo run --bin dotenv)"
|
||||
|
||||
# Run sqlx command
|
||||
sqlx $@
|
44
script/tailwind.config.js
Normal file
44
script/tailwind.config.js
Normal file
|
@ -0,0 +1,44 @@
|
|||
module.exports = {
|
||||
theme: {
|
||||
fontFamily: {
|
||||
display: [
|
||||
"Visby CF", "ui-sans-serif", "system-ui", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto",
|
||||
"Helvetica Neue", "Arial", "Noto Sans", "sans-serif", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
|
||||
"Noto Color Emoji"
|
||||
],
|
||||
body: [
|
||||
"Open Sans", "ui-sans-serif", "system-ui", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto",
|
||||
"Helvetica Neue", "Arial", "Noto Sans", "sans-serif", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
|
||||
"Noto Color Emoji"
|
||||
],
|
||||
},
|
||||
extend: {
|
||||
typography: (theme) => ({
|
||||
DEFAULT: {
|
||||
css: {
|
||||
h1: {
|
||||
fontFamily: theme("fontFamily.display").join(", ")
|
||||
},
|
||||
h2: {
|
||||
fontFamily: theme("fontFamily.display").join(", ")
|
||||
},
|
||||
h3: {
|
||||
fontFamily: theme("fontFamily.display").join(", ")
|
||||
},
|
||||
h4: {
|
||||
fontFamily: theme("fontFamily.display").join(", ")
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
variants: {
|
||||
},
|
||||
plugins: [
|
||||
require('@tailwindcss/typography'),
|
||||
],
|
||||
purge: [
|
||||
"../templates/**/*.hbs"
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue