sourcegraph/client/web-sveltekit/Dockerfile
Felix Kling 153cff847b
[experiment] Merge SvelteKit prototype into main (#47238)
This PR merges my prototype branch into main to make it easier to
iterate on the prototype and for others to contribute to it. It adds a
new web frontend under `client/web-sveltekit`.

I've been trying to make as little changes to the existing code base as
possible to make the initial merge simple. I made some small changes to
make it easier to reuse some functions.
Most importantly I'm trying to limit the "exposure" others might have to
the prototype by importing any dependencies from other `@sourcegraph/*`
packages into a few select TypeScript files (e.g. `src/lib/shared.ts`).
This way the risk of others having to work with Svelte is mitigated to
some degree.

The prototype implements the following pages (also see file structure
under `src/routes/`):

- Search home page
- Search result page
- Repo pages: root, file, tree, commits, branches, tags, contributors,
commit

It's configured to run as a client side application, without pre- or
server-side rendering.

You can run the development server via

```sh
cd client/web-sveltekit
pnpm run dev
```

The README file contains more information about running the development
server, linter and formatter.

Note: Some features (e.g. playwright) are not used yet but are committed
as part of the initial scaffolding.


Co-authored-by: William Bezuidenhout <william.bezuidenhout@sourcegraph.com>
2023-02-13 17:53:23 +01:00

15 lines
388 B
Docker

# This image creates a standalone web server for demoing the prototype
FROM node:16
ARG PROJECT_ROOT="."
WORKDIR /usr/src/app
RUN echo '{"type": "module"}' > package.json
RUN npm install express@~4.18 http-proxy-middleware@~2.0
COPY ${PROJECT_ROOT}/server.js ./
COPY ${PROJECT_ROOT}/build ./build
ENV SOURCEGRAPH_API_HOST=https://sourcegraph.com
EXPOSE 4173
CMD ["node", "server.js"]