Skip to content

Commit

Permalink
added dockerfiles and updated run instructions in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dany-fu committed Apr 21, 2020
1 parent 770e60f commit a9864ac
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 15 deletions.
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Build the JAR
FROM maven:3.5-jdk-8 AS build
COPY src /usr/src/knox/src
COPY pom.xml /usr/src/knox
RUN mvn -f /usr/src/knox/pom.xml clean package

# Base image containing Java runtime
FROM openjdk:8-jdk-alpine
COPY --from=build /usr/src/knox/target/knox-0.0.1-SNAPSHOT.jar /usr/knox/knox-0.0.1-SNAPSHOT.jar
# Make port 8080 available to the world outside this container
EXPOSE 8080
ENTRYPOINT ["java","-jar","/usr/knox/knox-0.0.1-SNAPSHOT.jar"]
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Knox - A Genetic Design Space Repository

## Quickstart

### Docker Instructions
1) Install [Docker Compose](https://docs.docker.com/compose/install/)
2) Clone this repository
3) Run `docker-compose up --build` in the root directory of this repo
4) Open Knox web interface at http://localhost:8080

### Non-Docker Instructions
1) Install [Neo4J](http://neo4j.com/download)
2) Open the Desktop app and add a new project
3) Within the project, click "Add Graph", then create a local graph using "*kn0x*" as password
4) Click "Start"
7) [Download](https://maven.apache.org/download.cgi) and [Install](https://maven.apache.org/install.html) Maven
8) Clone this repository
9) Run `mvn spring-boot:run` in the root directory of this repo
10) Open Knox web interface at http://localhost:8080
27 changes: 27 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: '3.7'

services:
knox-db:
image: neo4j:3.4.1-enterprise
ports:
- '7474:7474'
- '7687:7687' # for bolt
container_name: knox-db
environment:
- NEO4J_AUTH=neo4j/kn0x
- NEO4J_ACCEPT_LICENSE_AGREEMENT=yes
volumes:
# local_folder:container_folder
# for persistence
- ./data:/data
- ./logs:/logs
knox-app:
build:
context: .
ports:
- '8080:8080'
container_name: knox-app
environment:
- spring.data.neo4j.uri=bolt://knox-db:7687
depends_on:
- knox-db
15 changes: 0 additions & 15 deletions readme.adoc

This file was deleted.

0 comments on commit a9864ac

Please sign in to comment.