forked from hrbrmstr/pewpew
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wip] support an external dataset via mounted JSON file
- Loading branch information
Showing
9 changed files
with
1,016 additions
and
381 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
version: "1.0" | ||
services: | ||
pewpew: | ||
build: | ||
context: . | ||
dockerfile: ./docker/Dockerfile | ||
volumes: | ||
- ./docker/datasource/data:/opt/pewpew/data | ||
ports: | ||
- 8080:8080 | ||
restart: unless-stopped | ||
# depends_on: | ||
# - "pewpew_data" | ||
|
||
# pewpew_data: | ||
# build: | ||
# context: ./docker/datasource | ||
# dockerfile: ./docker/datasource/Dockerfile | ||
# volumes: | ||
# - ./docker/datasource/data:/datasource/data | ||
# restart: unless-stopped |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
FROM node:latest | ||
|
||
EXPOSE 8080 | ||
|
||
WORKDIR /opt/pewpew | ||
COPY . /opt/pewpew | ||
RUN npm install http-server -g | ||
RUN mkdir -p /opt/pewpew | ||
|
||
VOLUME ./data | ||
|
||
CMD ["http-server","-a","0.0.0.0","-p","8080","/opt/pewpew"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM node:latest | ||
|
||
EXPOSE 8090 | ||
WORKDIR /datasource | ||
COPY . . | ||
RUN npm install --include-dev | ||
|
||
VOLUME ./data | ||
|
||
CMD ["npm","run","trace"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"data":[{"hit":{"origin":{"latitude":37.3083,"longitude":-121.9643},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":37.7506,"longitude":-122.4121},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":37.7506,"longitude":-122.4121},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":37.3083,"longitude":-121.9643},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":37.3083,"longitude":-121.9643},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":37.3083,"longitude":-121.9643},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":37.3083,"longitude":-121.9643},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":37.3083,"longitude":-121.9643},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":30.5875,"longitude":-97.8535},"destination":{"latitude":37.3512,"longitude":-121.8846}}},{"hit":{"origin":{"latitude":37.3083,"longitude":-121.9643},"destination":{"latitude":37.3512,"longitude":-121.8846}}}]} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "pewpew-datasource", | ||
"version": "1.0.0", | ||
"description": "An adapter to pewpew to load a datasource", | ||
"main": "./src/index.ts", | ||
"scripts": { | ||
"trace": "ts-node ./src/index.ts" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"@types/node": "^20.8.7", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^5.2.2" | ||
} | ||
} |
Oops, something went wrong.