Skip to content

Commit dbbd5b0

Browse files
committed
Separated fractal-data from vizarr
1 parent 47b8b8e commit dbbd5b0

File tree

14 files changed

+80
-95
lines changed

14 files changed

+80
-95
lines changed

.env.example

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
PORT=3000
22
BIND_ADDRESS=0.0.0.0
33
FRACTAL_SERVER_URL=http://localhost:8000
4-
VIZARR_STATIC_FILES_PATH=/path/to/vizarr/dist
5-
BASE_PATH=/vizarr
4+
BASE_PATH=/data
65
AUTHORIZATION_SCHEME=fractal-server
76
CACHE_EXPIRATION_TIME=60

.github/workflows/docker.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
2323

2424
- name: Build the Docker image
25-
run: docker build . --tag ghcr.io/fractal-analytics-platform/fractal-vizarr-viewer:${{ github.event_name == 'workflow_dispatch' && inputs.tag || 'dev' }}
25+
run: docker build . --tag ghcr.io/fractal-analytics-platform/fractal-data:${{ github.event_name == 'workflow_dispatch' && inputs.tag || 'dev' }}
2626

2727
- name: Push the Docker Image
28-
run: docker push ghcr.io/fractal-analytics-platform/fractal-vizarr-viewer:${{ github.event_name == 'workflow_dispatch' && inputs.tag || 'dev' }}
28+
run: docker push ghcr.io/fractal-analytics-platform/fractal-data:${{ github.event_name == 'workflow_dispatch' && inputs.tag || 'dev' }}

.github/workflows/github_release.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ jobs:
7878
run: npm pack
7979

8080
- name: Extract the package
81-
run: tar -xzf fractal-vizarr-viewer-*.tgz
81+
run: tar -xzf fractal-data-*.tgz
8282

8383
- name: Repack the package removing parent folder
84-
run: tar -C package -czf node-${{ matrix.node-version }}-fractal-vizarr-viewer-${{ github.ref_name }}.tar.gz dist package.json node_modules LICENSE
84+
run: tar -C package -czf node-${{ matrix.node-version }}-fractal-data-${{ github.ref_name }}.tar.gz dist package.json node_modules LICENSE
8585

8686
- name: Release
8787
uses: softprops/[email protected]
8888
with:
89-
files: node-${{ matrix.node-version }}-fractal-vizarr-viewer-${{ github.ref_name }}.tar.gz
89+
files: node-${{ matrix.node-version }}-fractal-data-${{ github.ref_name }}.tar.gz

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Note: Numbers like (#123) point to closed Pull Requests on the fractal-vizarr-vi
22

33
# Unreleased
44

5+
* Separated fractal-data from vizarr, renamed repository to `fractal-data` (\#64);
56
* Added `BIND_ADDRESS` environment variable, defaulting to `0.0.0.0` for IPv4 binding (\#64);
67

78
# 0.3.2

Dockerfile

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
11
FROM node:20
22

3-
WORKDIR /
3+
RUN mkdir /fractal-data
44

5-
RUN git clone https://github.com/hms-dbmi/vizarr.git
6-
WORKDIR /vizarr
7-
8-
RUN git checkout eb2b77fed92a08c78c5770144bc7ccf19e9c7658
9-
RUN npx -y pnpm install
10-
RUN npx pnpm run build
11-
12-
RUN mkdir /fractal-vizarr-viewer
13-
14-
WORKDIR /fractal-vizarr-viewer
5+
WORKDIR /fractal-data
156

167
ADD src src
178
ADD package* .
@@ -20,6 +11,4 @@ ADD tsconfig.json .
2011
RUN npm install
2112
RUN npm run build
2213

23-
ENV VIZARR_STATIC_FILES_PATH=/vizarr/dist
24-
25-
CMD ["node", "/fractal-vizarr-viewer/dist/app.js"]
14+
CMD ["node", "/fractal-data/dist/app.js"]

README.md

Lines changed: 61 additions & 58 deletions
Large diffs are not rendered by default.
File renamed without changes.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "fractal-vizarr-viewer",
2+
"name": "fractal-data",
33
"version": "0.3.2",
44
"description": "",
55
"main": "dist/app.js",

src/app.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ app.use((req, _, next) => {
2020
const authorizer = getAuthorizer();
2121

2222
// Endpoint serving zarr files
23-
app.use(`${config.basePath}data`, async function (req, res) {
23+
app.use(`${config.basePath}files`, async function (req, res) {
2424
await serveZarrData(authorizer, req, res);
2525
});
2626

@@ -29,13 +29,10 @@ app.use(`${config.basePath}alive`, async function (req, res) {
2929
await aliveEndpoint(req, res);
3030
});
3131

32-
// Serving Vizarr static files
33-
app.use(`${config.basePath}`, express.static(config.vizarrStaticFilesPath));
34-
3532
// Start server
3633
const server = app.listen(config.port, config.bindAddress, () => {
3734
logger.info(
38-
"fractal-vizarr-viewer is listening at http://localhost:%d%s",
35+
"fractal-data is listening at http://localhost:%d%s",
3936
config.port,
4037
config.basePath
4138
);

0 commit comments

Comments
 (0)