-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: complete local docker-compose setup with cvat oracles
- Loading branch information
Showing
37 changed files
with
1,174 additions
and
86 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,24 @@ | ||
# Common file for apps that rely on root context | ||
.git | ||
.github | ||
.husky | ||
audits | ||
docs | ||
scripts | ||
**/node_modules | ||
**/build | ||
**/dist | ||
|
||
# Core package artifacts | ||
# Hardhat files | ||
**/abis | ||
**/artifacts | ||
**/cache | ||
**/.deps | ||
# TypeScript bindings output directory | ||
**/typechain-types | ||
|
||
# Docker-related | ||
.dockerignore | ||
**/Dockerfile* | ||
**/docker-compose* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Using bullseye instead of slim because it needs Python and build tools for node-gyp | ||
FROM node:18-bullseye | ||
ARG APP_PATH=packages/apps/human-app/frontend | ||
|
||
# Create app directory | ||
WORKDIR /usr/src/app | ||
|
||
# Copy expected yarn dist | ||
COPY .yarn ./.yarn | ||
COPY .yarnrc ./ | ||
# Copy files for deps installation | ||
COPY package.json yarn.lock ./ | ||
COPY ${APP_PATH}/package.json ./${APP_PATH}/package.json | ||
# Some deps are referenced as "*", so we need to build them | ||
COPY tsconfig.json ./ | ||
COPY packages/core ./packages/core | ||
COPY packages/sdk ./packages/sdk | ||
|
||
RUN yarn install | ||
|
||
# Copy everything else to ensure proper build process | ||
COPY . . | ||
|
||
WORKDIR ./${APP_PATH} | ||
RUN yarn build | ||
|
||
# Start the server using the build | ||
CMD [ "yarn", "start:prod" ] |
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
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 was deleted.
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 |
---|---|---|
@@ -1,17 +1,27 @@ | ||
# Base image | ||
FROM node:18 | ||
FROM node:18-slim | ||
ARG APP_PATH=packages/apps/human-app/server | ||
|
||
# Create app directory | ||
WORKDIR /usr/src/app | ||
|
||
# Bundle app source | ||
COPY . . | ||
# Copy expected yarn dist | ||
COPY .yarn ./.yarn | ||
COPY .yarnrc ./ | ||
# Copy files for deps installation | ||
COPY package.json yarn.lock ./ | ||
COPY ${APP_PATH}/package.json ./${APP_PATH}/package.json | ||
# Some deps are referenced as "*", so we need to build them | ||
COPY tsconfig.json ./ | ||
COPY packages/core ./packages/core | ||
COPY packages/sdk ./packages/sdk | ||
|
||
# Install app dependencies | ||
RUN yarn install | ||
|
||
# Creates a "dist" folder with the production build | ||
RUN yarn workspace @human-protocol/human-app-server build | ||
# Copy everything else to ensure proper build process | ||
COPY . . | ||
|
||
WORKDIR ./${APP_PATH} | ||
RUN yarn build | ||
|
||
# Start the server using the production build | ||
CMD [ "node", "packages/apps/human-app/server/dist/src/main.js" ] | ||
# Start the server using the build | ||
CMD [ "yarn", "start:prod" ] |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Using bullseye instead of slim because it needs Python and build tools for node-gyp | ||
FROM node:18-bullseye | ||
ARG APP_PATH=packages/apps/job-launcher/client | ||
|
||
# Create app directory | ||
WORKDIR /usr/src/app | ||
|
||
# Copy expected yarn dist | ||
COPY .yarn ./.yarn | ||
COPY .yarnrc ./ | ||
# Copy files for deps installation | ||
COPY package.json yarn.lock ./ | ||
COPY ${APP_PATH}/package.json ./${APP_PATH}/package.json | ||
# Some deps are referenced as "*", so we need to build them | ||
COPY tsconfig.json ./ | ||
COPY packages/core ./packages/core | ||
COPY packages/sdk ./packages/sdk | ||
|
||
RUN yarn install | ||
|
||
# Copy everything else to ensure proper build process | ||
COPY . . | ||
|
||
WORKDIR ./${APP_PATH} | ||
RUN yarn build | ||
|
||
# Start the server using the build | ||
CMD [ "yarn", "start:prod" ] |
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 |
---|---|---|
|
@@ -68,6 +68,3 @@ STRIPE_APP_INFO_URL= | |
|
||
# Sendgrid | ||
SENDGRID_API_KEY= | ||
|
||
# Cron Job Secret | ||
CRON_SECRET="cron-secret" |
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,17 +1,27 @@ | ||
# Base image | ||
FROM node:18 | ||
FROM node:18-slim | ||
ARG APP_PATH=packages/apps/job-launcher/server | ||
|
||
# Create app directory | ||
WORKDIR /usr/src/app | ||
|
||
# Bundle app source | ||
COPY . . | ||
# Copy expected yarn dist | ||
COPY .yarn ./.yarn | ||
COPY .yarnrc ./ | ||
# Copy files for deps installation | ||
COPY package.json yarn.lock ./ | ||
COPY ${APP_PATH}/package.json ./${APP_PATH}/package.json | ||
# Some deps are referenced as "*", so we need to build them | ||
COPY tsconfig.json ./ | ||
COPY packages/core ./packages/core | ||
COPY packages/sdk ./packages/sdk | ||
|
||
# Install app dependencies | ||
RUN yarn install | ||
|
||
# Creates a "dist" folder with the production build | ||
RUN yarn workspace @human-protocol/job-launcher-server build | ||
# Copy everything else to ensure proper build process | ||
COPY . . | ||
|
||
WORKDIR ./${APP_PATH} | ||
RUN yarn build | ||
|
||
# Start the server using the production build | ||
CMD [ "node", "packages/apps/job-launcher/server/dist/src/main.js" ] | ||
# Start the server using the build | ||
CMD [ "yarn", "start:prod" ] |
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
Oops, something went wrong.