Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1093 bug wrong docker files for library microservice #1102

Merged
6 changes: 0 additions & 6 deletions deploy/config/lib.env

This file was deleted.

6 changes: 6 additions & 0 deletions deploy/config/libms.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
port: '4001'
mode: 'local'
local-path: '/dtaas/libms/files'
log-level: 'debug'
apollo-path: '/lib'
graphql-playground: 'true'
2 changes: 1 addition & 1 deletion docker/compose.dev.yml
prasadtalasila marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ services:
restart: unless-stopped
volumes:
- ${DTAAS_DIR}/files:/dtaas/libms/files
- ${LIB_CONFIG}:/dtaas/libms/config/.env.default
- ${LIB_CONFIG}:/dtaas/libms/config/libms.dev.yaml
prasadtalasila marked this conversation as resolved.
Show resolved Hide resolved
labels:
- "traefik.enable=true"
- "traefik.http.routers.libms.entryPoints=web"
Expand Down
7 changes: 4 additions & 3 deletions docker/libms.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20.10.0-slim as build
FROM node:22.12.0-slim as build

#! docker should be run from the root directory of the project

Expand All @@ -15,13 +15,14 @@ RUN yarn install --immutable --immutable-cache --check-cache
RUN yarn build


FROM node:20.10.0-slim
FROM node:22.12.0-slim
COPY --from=build /dtaas/libms/dist /dtaas/libms/dist
COPY --from=build /dtaas/libms/node_modules /dtaas/libms/node_modules
COPY --from=build /dtaas/libms/package.json /dtaas/libms/package.json
COPY --from=build /dtaas/libms/config /dtaas/libms/config

WORKDIR /dtaas/libms
COPY ./deploy/config/libms.yaml libms.yaml

# Define the command to run your app
CMD ["yarn", "start", "--config", "config/.env.default", "-H", "config/http.json"]
CMD ["yarn", "start", "--config", "libms.yaml", "-H", "config/http.json"]
2 changes: 1 addition & 1 deletion docker/libms.npm.dockerfile
nichlaes marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ WORKDIR /dtaas/libms
ARG VERSION="latest"
RUN npm i -g @into-cps-association/libms@${VERSION}

COPY ./deploy/config/lib.env .env
COPY ./deploy/config/libms.yaml libms.yaml
COPY ./servers/lib/config/http.json .

# Define the command to run your app
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/docker/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The configuration files to be updated are:
1. **client/config/local.js**
please see [client config](../../admin/client/config.md) for help
with updating this config file
1. **servers/lib/config/.env.default**
1. **servers/lib/config/libms.dev.yaml**
please see [lib config](../../admin/servers/lib/docker.md) for help
with updating this config file

Expand Down
14 changes: 2 additions & 12 deletions servers/lib/DEVELOPER.md
prasadtalasila marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,7 @@ running the following commands.

The microservices require configuration and the docker version
of the microservices uses the configuration
file available in `config/.env.default`.

Please add a `.env` file with the environment variables for
the docker compose file to use.
e.g.

```sh
PORT='4001'
MODE='local'
LOCAL_PATH='..\..\files'
```
file available in `config/libms.dev.yaml`.

### Use

Expand All @@ -140,7 +130,7 @@ docker compose -f compose.lib.dev.yml up -d

This command brings up the lib docker container and makes
the website available at <http://localhost:4001>.
The `config/.env.default` file is used as the microservice configuration.
The `config/libms.dev.yaml` file is used as the microservice configuration.
prasadtalasila marked this conversation as resolved.
Show resolved Hide resolved
If the configuration values are changed, please restart the container.

```bash
Expand Down
2 changes: 1 addition & 1 deletion servers/lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ needs to have _read:packages_ scope.

## :gear: Configure

The microservices requires config specified in INI format.
The microservices requires config specified in yaml format.
The template configuration file is:

```yaml
Expand Down
6 changes: 6 additions & 0 deletions servers/lib/config/libms.dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
port: '4001'
mode: 'local'
local-path: '/dtaas/libms/files'
log-level: 'debug'
apollo-path: '/lib'
graphql-playground: 'true'
6 changes: 2 additions & 4 deletions servers/lib/config/libms.yaml.default
prasadtalasila marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
port: '4001'
mode: 'git'
mode: 'local'
local-path: '..\..\files'
log-level: 'debug'
apollo-path: '/lib'
graphql-playground: 'true'

git-repos:
- user-1:
repo-url: 'https://github.com/isomorphic-git/lightning-fs'
- user-2:
repo-url: 'https://github.com/isomorphic-git/lightning-fs'
repo-url: 'https://github.com/INTO-CPS-Association/DTaaS.git'
2 changes: 1 addition & 1 deletion servers/lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@into-cps-association/libms",
"version": "0.5.2",
"version": "0.5.3",
"description": "microservices that handles request by fetching and returning the file-names and folders of given directory",
"author": "[email protected]",
"contributors": [
Expand Down
Loading