Skip to content
This repository has been archived by the owner on Apr 9, 2023. It is now read-only.

Commit

Permalink
feature: add support for easy now deployments (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
byCedric authored Oct 18, 2018
1 parent 765c927 commit 37d2dc4
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,25 @@ Let your work speak for itself, have a simple site shows your GitHub feed!
[![Code Climate grade](https://img.shields.io/codeclimate/maintainability/byCedric/GitHub-Website.svg?style=flat-square)](https://codeclimate.com/github/byCedric/GitHub-Website)
[![Greenkeeper](https://img.shields.io/badge/greenkeeper-enabled-brightgreen.svg?style=flat-square)](https://greenkeeper.io/)

## Getting started

Starting an instance special tailored for you is not that hard.
It's done by running a single CLI/[Now](https://now.sh) command!

```bash
$ now bycedric/github-website
```

This command will ask for your GitHub username and will build the project automatically.
It might take a couple of minutes before everything is deployed and ready for use.
In case you want to automate the deployments, you can define the username in the command itself.

```bash
$ now bycedric/github-website --build-env GITHUB_USERNAME=byCedric
```

> Read more about [Now build arguments here](https://zeit.co/blog/build-env).
## Contributing

Contributions are always welcome.
Expand Down
10 changes: 10 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM bycedric/ci-node as build
ARG GITHUB_USERNAME
ENV REACT_APP_GITHUB_USERNAME=$GITHUB_USERNAME
WORKDIR /code
COPY . .
RUN npm install --no-save && npm run build

FROM bycedric/serve-webapp
COPY --from=build /code/build /var/www/http
EXPOSE 80
11 changes: 11 additions & 0 deletions now.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"type": "docker",
"features": {
"cloud": "v2"
},
"build": {
"env": [
"GITHUB_USERNAME"
]
}
}

0 comments on commit 37d2dc4

Please sign in to comment.