Skip to content

Commit

Permalink
Include Dockerfile.dev and docs to run neuroglancer dev locally
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Kanzer authored and Aaron Kanzer committed Oct 17, 2024
1 parent 4074c3c commit dc45f8d
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# to run locally:
# docker build -f Dockerfile.dev -t <some-awesome-app-name> .
# docker run -v $(pwd):/app -p 8080:8080 --rm <some-awesome-app-name>

FROM node:20.11.1

WORKDIR /app

# Copy package.json and package-lock.json for installing dependencies
COPY package*.json ./

# Install project dependencies
RUN npm install

# Copy the rest of your app's source code from your host to your image filesystem.
COPY . .

# Install project dependencies
# RUN npm i

# Vue CLI serves on port 8080 by default, expose that port
# EXPOSE 8080

# Command to run the app using npm
# CMD ["npm", "run", "dev-server"]
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,16 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

# Local Docker development

To control versioning and development on your local machine, please reference the `Dockerfile.dev` as a convenience.

To run the Dockerfile:

```shell
docker build -f Dockerfile.dev -t <some-awesome-app-name> .
docker run -v $(pwd):/app -p 8080:8080 --rm <some-awesome-app-name>
```

Hot-reloading should be present.

0 comments on commit dc45f8d

Please sign in to comment.