Skip to content

Commit

Permalink
Merge pull request #32 from kbss-cvut/feature/issue-31-debug-spipes-e…
Browse files Browse the repository at this point in the history
…ditor

Feature/issue 31 debug spipes editor
  • Loading branch information
blcham authored Aug 14, 2023
2 parents e811252 + 6509698 commit 4a22315
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,20 @@ Run development server
$ npm run dev
```

## Development with Docker Compose
Here is the common procedure to debug individual services of the s-pipes-editor-ui. `<service-name>` can be replaced
by one of the values `s-pipes-editor-ui`, `s-pipes-editor-rest` and `s-pipes-engine`.
1. cd to `$PROJECT_ROOT`.
2. Run `docker-compose -f docker-compose-dev.yml up` if not running already. Otherwise, run
`docker-compose -f docker-compose-dev.yml start`.
3. Stop the service which you want to develop `docker-compose -f docker-compose-dev.yml stop <service-name>`
4. Start `<service-name>` in development environment
- `s-pipes-editor-ui` - run `npm run dev`
- `s-pipes-editor-rest` - start run/debug springboot configuration in IntelliJ IDEA
- `s-pipes-engine` - start run/debug springboot configuration in IntelliJ IDEA

Composing up, start and stop can also be done trough docker desktop and intellij idea service tab.

### Dockerization
The docker image of SPipes Editor UI can be built by `docker build -t s-pipes-editor-ui .`

Expand Down
77 changes: 77 additions & 0 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
version: '3'

services:
s-pipes-editor-ui:
image: 'ghcr.io/kbss-cvut/s-pipes-editor-ui/s-pipes-editor-ui:latest'
container_name: s-pipes-editor-ui
ports:
- '3000:80'
networks:
- overlay
depends_on:
- s-pipes-editor-rest
environment:
- SERVICE_URL=${SPIPES_EDITOR_REST:-http://host.docker.internal:18115}

s-pipes-editor-rest:
image: 'ghcr.io/kbss-cvut/s-pipes-editor/s-pipes-editor:latest'
container_name: s-pipes-editor-rest
ports:
- ${EDITOR_REST_PORT:-18115}:18115
expose:
- "18115"
networks:
- overlay
depends_on:
- s-pipes-engine
- rdf4j
environment:
- SCRIPTPATHS=${SCRIPTPATHS:-${PWD}/../s-pipes-modules;${CUSTOM_SCRIPT_PATHS:-${PWD}/../s-pipes/doc/examples}}
- SCRIPTRULES=${SCRIPTRULES:-${PWD}/../s-pipes-editor/src/main/resources/rules}
- ENGINEURL=${SPIPES_ENGINE:-http://host.docker.internal:8081/s-pipes/}
- RDF4J_REPOSITORYURL=${RDF4J_SERVER_URL:-http://rdf4j:8080/rdf4j-server}/repositories
- RDF4J_REPOSITORYNAME=${RDF4J_REPOSITORYNAME:-s-pipes-hello-world}
- RDF4J_PCONFIGURL=${RDF4J_PCONFIGURL:-../s-pipes/doc/examples/hello-world/config.ttl}
volumes:
- /tmp:/tmp
- ${SHARED_ROOT:-/home}:${SHARED_ROOT:-/home}
- /usr/local/tomcat/temp/:/usr/local/tomcat/temp/


s-pipes-engine:
image: 'ghcr.io/kbss-cvut/s-pipes/s-pipes-engine:latest'
# container_name: s-pipes-engine
ports:
- ${SPIPES_PORT:-8081}:8080
expose:
- "8080"
networks:
- overlay
depends_on:
- rdf4j
environment:
- CONTEXTS_SCRIPTPATHS=${SCRIPTPATHS:-${PWD}/../s-pipes-modules;${CUSTOM_SCRIPT_PATHS:-${PWD}/../s-pipes/doc/examples}}
volumes:
- /tmp:/tmp
- ${SHARED_ROOT:-/home}:${SHARED_ROOT:-/home}
- /usr/local/tomcat/temp/:/usr/local/tomcat/temp/

rdf4j:
image: 'eclipse/rdf4j-workbench:3.7.7'
container_name: rdf4j
expose:
- "8080"
networks:
- overlay
environment:
- JAVA_OPTS=-Xms1g -Xmx4g
volumes:
- data:/var/rdf4j
- logs:/usr/local/tomcat/logs

volumes:
data:
logs:

networks:
overlay:

0 comments on commit 4a22315

Please sign in to comment.