Skip to content

Commit

Permalink
docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Weigel committed Jan 30, 2019
1 parent ed3d06e commit 515c13e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 10 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,17 @@ A list of catalogs that are served using this sofware is given at [http://hapi-s
<a name="Installation"></a>
## 2. Installation

[Binary packages](https://github.com/hapi-server/server-nodejs/releases) are available for Windows 10 x64, OS-X x64, Linux x64, and Linux ARMv7l (e.g., Rasberry Pi). Installation and startup commands are given below. See the [Development](#Development) section for instructions on installing from source.
A [Docker image](https://cloud.docker.com/repository/docker/rweigel/hapi-server) as well as [Binary packages](https://github.com/hapi-server/server-nodejs/releases) are available for OS-X x64, Linux x64, and Linux ARMv7l (e.g., Rasberry Pi).

Installation and startup commands are given below the binary packages and docker image. See the [Development](#Development) section for instructions on installing from source.

Docker:

```
docker pull rweigel/hapi-server:v0.9.4
docker run -dit --name hapi-server-0.9.4 --expose 8999 -p 8999:8999 rweigel/hapi-server:v0.9.4
docker exec -it hapi-server-v0.9.4 ./hapi-server
```

OS-X x64:

Expand Down
26 changes: 17 additions & 9 deletions pkg/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
NODEV=v6.16.0
NODED=https://nodejs.org/dist/latest-v6.x
VERSION=v0.0.0
VERSION=v0.9.4
OS=darwin-x64 # Did this on High Sierra
#OS=linux-x64 # Did this on Alpine 3.8
#OS=linux-armv7l # Did this on Pi 3+
Expand All @@ -22,21 +22,29 @@ ifeq ($(OS),darwin-x64)
SERVER=osx-el-capitan
endif

# docker system prune -af
docker-build:
docker:
- docker stop hapi-server
- docker rm hapi-server
docker build --file Dockerfile -t rweigel/hapi-server:$(VERSION) ../
docker run -dit --name hapi-server --expose 8999 -p 8999:8999 rweigel/hapi-server:$(VERSION)
docker run -dit --name hapi-server-$(VERSION) --expose 8999 -p 8999:8999 rweigel/hapi-server:$(VERSION)

docker-test:
docker exec -it hapi-server-$(VERSION) ./hapi-server test
docker stop hapi-server-$(VERSION)

docker-release:
docker login
docker tag rweigel/hapi-server:$(VERSION) rweigel/hapi-server:$(VERSION)
docker push rweigel/hapi-server:$(VERSION)

# docker run --name hapiserver --expose 8999 -p 8999:8999 hapiserver
docker-test:
docker exec -it hapi-server ./hapi-server test
docker stop hapi-server
#make docker-release-test VERSION=$(VERSION)

docker-release-test:
- docker stop hapi-server-release-$(VERSION)
- docker rm hapi-server-release-$(VERSION)
docker system prune -af
docker pull rweigel/hapi-server:$(VERSION)
docker run -dit --name hapi-server-release-$(VERSION) --expose 8998 -p 8998:8998 rweigel/hapi-server:$(VERSION)
docker exec -it hapi-server-release-$(VERSION) ./hapi-server test

release:
cd ..; rm -rf node_modules; npm install --production;
Expand Down

0 comments on commit 515c13e

Please sign in to comment.