tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
289
fork
atom
a tool for shared writing and social publishing
289
fork
atom
overview
issues
27
pulls
pipelines
add disco to deploy appview! Thanks greg!!!
awarm.space
10 months ago
e547f073
e6d68cc9
+33
-2
4 changed files
expand all
collapse all
unified
split
appview
Dockerfile
index.ts
disco.json
package.json
+11
appview/Dockerfile
···
1
1
+
FROM node:latest
2
2
+
WORKDIR /code
3
3
+
4
4
+
# start with dependencies to enjoy caching
5
5
+
COPY ./package.json /code/package.json
6
6
+
COPY ./package-lock.json /code/package-lock.json
7
7
+
RUN npm ci
8
8
+
9
9
+
# copy rest and build
10
10
+
COPY . /code/.
11
11
+
CMD ["npm", "run", "start-appview-prod"]
+1
-1
appview/index.ts
···
12
12
import { AtUri } from "@atproto/syntax";
13
13
import { writeFile, readFile } from "fs/promises";
14
14
15
15
-
const cursorFile = "./cursor";
15
15
+
const cursorFile = "/cursor/cursor";
16
16
17
17
let supabase = createClient<Database>(
18
18
process.env.NEXT_PUBLIC_SUPABASE_API_URL as string,
+19
disco.json
···
1
1
+
{
2
2
+
"version": "1.0",
3
3
+
"services": {
4
4
+
"worker": {
5
5
+
"image": "appview",
6
6
+
"volumes": [
7
7
+
{
8
8
+
"name": "cursor",
9
9
+
"destinationPath": "/cursor"
10
10
+
}
11
11
+
]
12
12
+
}
13
13
+
},
14
14
+
"images": {
15
15
+
"appview": {
16
16
+
"dockerfile": "appview/Dockerfile"
17
17
+
}
18
18
+
}
19
19
+
}
+2
-1
package.json
···
7
7
"dev": "next dev",
8
8
"lexgen": "tsx ./lexicons/build.ts && lex gen-api ./lexicons/api ./lexicons/pub/leaflet/* ./lexicons/pub/leaflet/*/* ./lexicons/com/atproto/*/* --yes",
9
9
"wrangler-dev": "wrangler dev",
10
10
-
"start-appview": "tsx --env-file='./.env.local' --watch appview/index.ts"
10
10
+
"start-appview-dev": "tsx --env-file='./.env.local' --watch appview/index.ts",
11
11
+
"start-appview-prod": "tsx appview/index.ts"
11
12
},
12
13
"keywords": [],
13
14
"author": "",