Skip to content

Commit 4d790e2

Browse files
committed
feat: Clean up docker files and add EYE reasoner installation
1 parent d237c35 commit 4d790e2

5 files changed

Lines changed: 25 additions & 48 deletions

File tree

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
**/.classpath
22
**/.dockerignore
33
**/.env
4+
**/.idea
45
**/.git
56
**/.gitignore
67
**/.project
78
**/.settings
89
**/.toolstarget
910
**/.vs
1011
**/.vscode
12+
**/.yarn
1113
**/*.*proj.user
1214
**/*.dbmdl
1315
**/*.jfm

Dockerfile

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,24 @@
1-
FROM node:20.0.0
1+
FROM node:22
22
ENV NODE_ENV=production
3-
WORKDIR /usr/src/app
4-
# COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
5-
# RUN npm install -g yarn
6-
7-
COPY . .
83

9-
ENV YARN_VERSION 4.0.0
10-
RUN yarn policies set-version $YARN_VERSION
4+
# Install EYE reasoner
5+
RUN apt-get update \
6+
&& apt-get install swi-prolog -y \
7+
&& git clone https://github.com/eyereasoner/eye.git \
8+
&& /eye/install.sh --prefix=/usr/local \
9+
&& rm -r /eye
1110

12-
RUN corepack enable yarn
13-
RUN yarn install
14-
# COPY . .
11+
WORKDIR /usr/src/app
12+
COPY . .
1513

16-
RUN yarn build
14+
# Install packages and build server
15+
RUN corepack enable yarn \
16+
&& yarn install \
17+
&& yarn build \
18+
&& chown -R node /usr/src/app
1719

1820
EXPOSE 3000
1921
EXPOSE 4000
20-
EXPOSE 4444
21-
EXPOSE 5123
22-
EXPOSE 8201
23-
EXPOSE 8202
24-
EXPOSE 8203
2522

26-
RUN chown -R node /usr/src/app
2723
USER node
28-
CMD ["yarn", "start:demo"]
24+
CMD ["yarn", "start"]

docker-compose.debug.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

docker-compose.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
version: '3.4'
1+
# The server is currently configured to use localhost as its base URL.
2+
# When using multiple docker containers that want to interact with each other, 0.0.0.0 should be used.
3+
# Because of this, and also because of potential external interactions with the server,
4+
# it might be necessary in the future to add changes to support this.
5+
# Newer versions of CSS can be configured to allow multiple base URLs which will be necessary then.
26

37
services:
4-
pacsoi-poc-1:
5-
image: pacsoi-poc1
8+
solidtrustflows:
9+
image: solidtrustflows
610
build:
711
context: .
812
dockerfile: ./Dockerfile
@@ -11,8 +15,3 @@ services:
1115
ports:
1216
- 3000:3000
1317
- 4000:4000
14-
- 4444:4444
15-
- 5123:5123
16-
- 8201:8201
17-
- 8202:8202
18-
- 8203:8203

dockerize.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/bin/bash
2-
docker image build --pull --file './Dockerfile' --tag 'solidlab-trust-flows-demo:latest' --label 'com.microsoft.created-by=visual-studio-code' --network=host ./
2+
docker image build --pull --file './Dockerfile' --tag 'solidlab-trust-flows-demo:latest' --network=host .

0 commit comments

Comments
 (0)