Skip to content

Commit

Permalink
feat: add a docker setup for local development (#984)
Browse files Browse the repository at this point in the history
To overcome the uncertainty of different node versions
for local development, a docker container can now be used.
  • Loading branch information
spiess-demos authored and salisdemos committed Dec 10, 2024
1 parent 86bcc4b commit b634a7f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,20 @@
[![Common Changelog](https://common-changelog.org/badge.svg)](https://common-changelog.org)

Vue components, Vue directives, Design Token and Scss files to build interfaces for demosPlan.

### Using the local Docker container

To have a consistent environment for building demosplan-ui, a Docker configuration exists.
For Docker Compose 1, the syntax has to be adapted to `docker-compose` instead of `docker compose`.
The below commands use Docker Compose 2 syntax.

```shell
# Start the container
docker compose -f docker-compose.local.yml up -d

# Shell into the container
docker compose -f docker-compose.local.yml exec demosplan_ui_local sh

# Stop container
docker compose -f docker-compose.local.yml down
```
9 changes: 9 additions & 0 deletions docker-compose.local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
services:
demosplan_ui_local:
image: node:18-alpine # Set to node:20-alpine for node 20
environment:
- TZ=Europe/Berlin # Jest tests related to date fail with a UTC container
working_dir: /app
volumes:
- .:/app
command: sh -c "tail -f /dev/null"

0 comments on commit b634a7f

Please sign in to comment.