-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
30da502
commit 08397dd
Showing
4 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: build docker | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
|
||
jobs: | ||
build-docker: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up node version | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.9' | ||
- name: Install dependencies | ||
run: yarn install --no-immutable --inline-builds | ||
shell: bash | ||
- name: Webpack build | ||
run: yarn run webpack:prod | ||
shell: bash | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ghcr.io/datavisyn/visyn_core | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./deploy/standalone/Dockerfile | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# This Dockerfile is used as standalone container for simple deployments, it will be built automatically by GH Actions in the build.yml | ||
FROM python:3.10-buster | ||
|
||
# Copy everything from our backend to our app folder # need to copy backend because we have to install the python packages | ||
COPY visyn_core/ /app/visyn_core/ | ||
COPY Makefile MANIFEST.in README.md setup.py setup.cfg package.json requirements.txt requirements_dev.txt /app/ | ||
|
||
# define target folder | ||
WORKDIR /app/ | ||
|
||
# Install some build tools and finally python dependencies (numpy is required to build opentsne) | ||
RUN make install | ||
|
||
# Override the setttings.py to use include the bundled frontend | ||
ENV VISYN_CORE__BUNDLES_DIR /app/bundles | ||
# Disable the login and always use a anonymous user | ||
ENV VISYN_CORE__SECURITY__STORE__NO_SECURITY_STORE__ENABLE true | ||
ENV VISYN_CORE__SECURITY__STORE__NO_SECURITY_STORE__USER anonymous | ||
|
||
# copy the pre-built front-end --> comment for development because we mount the volume anyway | ||
COPY bundles/ /app/bundles/ | ||
|
||
# expose default port | ||
EXPOSE 9000 | ||
|
||
CMD ["uvicorn", "visyn_core.server.main:app", "--host", "0.0.0.0", "--port", "9000"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters