allen-cell-animated / website-3d-cell-viewer

Other
4 stars 4 forks source link

feat: Replaced Dockerfile #244

Closed ShrimpCryptid closed 2 months ago

ShrimpCryptid commented 2 months ago

Closes #169, "Dockerfile is out of date". Adds a new Dockerfile that performs the build and makes the files available via a nginx dev server, and fixes some other bugs along the way with video.

Changes

Verification

Follow the steps specified in the README! Spelling them out here:

  1. Install Docker locally: instructions for Windows, instructions for Mac
  2. Clone the project and navigate to the root.
  3. Run docker build -t 3d-volume-viewer .
  4. Run docker run --rm -p 8080:80 --name 3d-volume-viewer 3d-volume-viewer
  5. Go to http://localhost:8080. Pages should load in as expected.
  6. Refreshing any of the subpages should still show the subpage as expected.
toloudis commented 2 months ago

Added @amilworks because he has written a dockerfile for this viewer before

amilworks commented 2 months ago

Added @amilworks because he has written a dockerfile for this viewer before

Yes, I made a very minimal Dockerfile that worked with the cvapipe app as a standalone service. I embedded the 3D Cell Viewer using an iFrame. Below is the Dockerfile I used.

# Official Node.js runtime as a parent image
FROM node:14

# Set working dir inside the container
WORKDIR /app

# Copy the rest of the application code to the container
COPY . .

# Expose the port for the app 
EXPOSE 9020

# Define command to run 3D Viewer application
CMD [ "npm", "start" ]

I built a separate service to serve images from AWS which simply uses FastAPI.