Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial docker file #15

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# specify the node base image with your desired version node:<version>
FROM node:10.1

EXPOSE 3000
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,34 @@ npm run build:preview

See [package.json](package.json#L8) for all tasks.

## Usage with docker

### :exclamation: Prerequisites


Clone this repository and run:

```bash
docker build -t mhp .
```

This will take some time and will install the correct version of node to run Victor Hugo inside a docker container.

```bash
sudo docker run -v "$(pwd)":/app -w /app mhp npm install
```

This will take some time and will install all packages necessary to run Victor Hugo and its tasks.

### :construction_worker: Development

While developing your website, use:
```bash
docker run -v "$(pwd)":/app -w /app --net=host mhp npm run start
```

Then visit http://localhost:3000/ to preview your new website. Webpack Dev Server will automatically reload the CSS or refresh the whole page, when stylesheets or content changes.

## Structure

```
Expand Down