-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(unigraph): improve user experience with Docker
- Loading branch information
1 parent
5d9525c
commit 487a11e
Showing
5 changed files
with
77 additions
and
1 deletion.
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,28 @@ | ||
.git | ||
# System files | ||
.DS_Store | ||
|
||
# Logs | ||
*.log | ||
npm-debug.log* | ||
|
||
# Directories | ||
node_modules | ||
*/node_modules | ||
packages/*/dist | ||
.ignore | ||
coverage/ | ||
.history | ||
|
||
# Secrets | ||
secrets.env.json | ||
|
||
# Etc | ||
packages/unigraph-dev-backend/exports.json | ||
|
||
# Obsidian for docs | ||
docs/.obsidian/workspace | ||
docs/.obsidian/plugins | ||
|
||
# Linting | ||
.eslintcache |
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,36 @@ | ||
# syntax=docker/dockerfile:1 | ||
FROM amd64/ubuntu:20.04 | ||
|
||
# Set up dependencies | ||
RUN apt update && apt install -y curl wget | ||
|
||
# Set up Node.js 16 | ||
RUN curl -sL https://deb.nodesource.com/setup_16.x -o /tmp/nodesource_setup.sh | ||
RUN bash /tmp/nodesource_setup.sh | ||
RUN apt update && apt install -y nodejs | ||
RUN npm install yarn -g | ||
|
||
# Set up dgraph | ||
ADD https://github.com/unigraph-dev/dgraph/releases/latest/download/dgraph_linux_amd64 dgraph_linux_amd64 | ||
RUN mkdir /opt/unigraph | ||
RUN mv dgraph_linux_amd64 /opt/dgraph | ||
RUN chmod +x /opt/dgraph | ||
|
||
# Set up unigraph, with incremental caches | ||
COPY package.json yarn.lock /app/ | ||
COPY ./packages/unigraph-dev-backend/package.json /app/packages/unigraph-dev-backend/package.json | ||
COPY ./packages/unigraph-dev-common/package.json /app/packages/unigraph-dev-common/package.json | ||
COPY ./packages/unigraph-dev-electron/package.json /app/packages/unigraph-dev-electron/package.json | ||
COPY ./packages/unigraph-dev-explorer/package.json /app/packages/unigraph-dev-explorer/package.json | ||
RUN cd /app && yarn | ||
COPY . /app | ||
RUN cd /app && yarn | ||
RUN cd /app && yarn build-deps | ||
|
||
# Run Unigraph | ||
WORKDIR /app | ||
CMD ["sh", "-c", "./scripts/start_server.sh -b /opt/dgraph -d /opt/unigraph & yarn explorer-start"] | ||
|
||
EXPOSE 3000 | ||
EXPOSE 4001 | ||
EXPOSE 4002 |
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
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
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