Skip to content

Commit a9864ac

Browse files
committed
added dockerfiles and updated run instructions in readme
1 parent 770e60f commit a9864ac

File tree

4 files changed

+58
-15
lines changed

4 files changed

+58
-15
lines changed

Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Build the JAR
2+
FROM maven:3.5-jdk-8 AS build
3+
COPY src /usr/src/knox/src
4+
COPY pom.xml /usr/src/knox
5+
RUN mvn -f /usr/src/knox/pom.xml clean package
6+
7+
# Base image containing Java runtime
8+
FROM openjdk:8-jdk-alpine
9+
COPY --from=build /usr/src/knox/target/knox-0.0.1-SNAPSHOT.jar /usr/knox/knox-0.0.1-SNAPSHOT.jar
10+
# Make port 8080 available to the world outside this container
11+
EXPOSE 8080
12+
ENTRYPOINT ["java","-jar","/usr/knox/knox-0.0.1-SNAPSHOT.jar"]

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Knox - A Genetic Design Space Repository
2+
3+
## Quickstart
4+
5+
### Docker Instructions
6+
1) Install [Docker Compose](https://docs.docker.com/compose/install/)
7+
2) Clone this repository
8+
3) Run `docker-compose up --build` in the root directory of this repo
9+
4) Open Knox web interface at http://localhost:8080
10+
11+
### Non-Docker Instructions
12+
1) Install [Neo4J](http://neo4j.com/download)
13+
2) Open the Desktop app and add a new project
14+
3) Within the project, click "Add Graph", then create a local graph using "*kn0x*" as password
15+
4) Click "Start"
16+
7) [Download](https://maven.apache.org/download.cgi) and [Install](https://maven.apache.org/install.html) Maven
17+
8) Clone this repository
18+
9) Run `mvn spring-boot:run` in the root directory of this repo
19+
10) Open Knox web interface at http://localhost:8080

docker-compose.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version: '3.7'
2+
3+
services:
4+
knox-db:
5+
image: neo4j:3.4.1-enterprise
6+
ports:
7+
- '7474:7474'
8+
- '7687:7687' # for bolt
9+
container_name: knox-db
10+
environment:
11+
- NEO4J_AUTH=neo4j/kn0x
12+
- NEO4J_ACCEPT_LICENSE_AGREEMENT=yes
13+
volumes:
14+
# local_folder:container_folder
15+
# for persistence
16+
- ./data:/data
17+
- ./logs:/logs
18+
knox-app:
19+
build:
20+
context: .
21+
ports:
22+
- '8080:8080'
23+
container_name: knox-app
24+
environment:
25+
- spring.data.neo4j.uri=bolt://knox-db:7687
26+
depends_on:
27+
- knox-db

readme.adoc

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)