Add dockerfile and basic CI config

This commit is contained in:
Ladd Hoffman 2023-07-19 05:38:17 -05:00
parent 74d18a69d4
commit 9ee0de30a4
4 changed files with 33 additions and 0 deletions

1
.nvmrc Normal file
View File

@ -0,0 +1 @@
20

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM node:20
RUN apt-get -y update && apt-get -y upgrade
RUN npm install --global npm
RUN mkdir -p /opt/reputation-api
WORKDIR /opt/reputation-api
ADD package.json package-lock.json nest-cli.json tsconfig.json tsconfig.build.json ./
ADD src/ ./src/
RUN npm install
RUN npm run build
CMD ["npm", "start"]

View File

@ -5,6 +5,12 @@ Reputation API is an implementation of DGF (DAO Governance Framework) for Reputa
For more detailed information about DGF, please refer to the [DOA Governance Framework Wiki](https://daogovernanceframework.com/wiki/DAO_Governance_Framework). For more detailed information about DGF, please refer to the [DOA Governance Framework Wiki](https://daogovernanceframework.com/wiki/DAO_Governance_Framework).
## Development
Install [nvm](https://nvm.sh), and then use it to install the correct version of `node`
nvm install
## Technology Stack ## Technology Stack
### Node.js ### Node.js

12
docs/.gitlab-ci.yml Normal file
View File

@ -0,0 +1,12 @@
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
before_script:
- podman login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
oci-container-build:
stage: build
script:
- podman build -t $IMAGE_TAG .
- podman push $IMAGE_TAG
when: manual