Skip to content

Commit

Permalink
Add docker compose config, Updated readme how to use docker compose.
Browse files Browse the repository at this point in the history
  • Loading branch information
assadriaz committed May 3, 2024
1 parent db888d4 commit fc2a4f2
Show file tree
Hide file tree
Showing 4 changed files with 4,621 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ for more detail see https://www.testcontainers.org/supported_docker_environment/

(default profiles are set in application.properties)

## Run tiamat with Docker compose
To run Tiamat with Docker compose, you need to have a docker-compose.yml file. In docker-compose folder you will find a compose.yml file.:
```
docker compose up
```
This will start Tiamat with PostgreSQL and Hazelcast. and you can access Tiamat on http://localhost:1888 and the database on http://localhost:5433
and graphiql on http://localhost:8777/services/stop_places/graphql , At start up tiamat copy empty schema to the database. Spring properties are set in application.properties.
Security is disabled in this setup.

## Run with external properties file and PostgreSQL
To run with PostgreSQL you ned an external application.properties.
Below is an example of application.properties:
Expand Down
44 changes: 44 additions & 0 deletions docker-compose/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
services:
app:
image: 'entur/tiamat:latest'
build:
context: ..
container_name: tiamat
networks:
- tiamat-net
depends_on:
- db
environment:
- SPRING_CONFIG_LOCATION=/etc/application-config/application.properties
- env=dev
- JDK_JAVA_OPTIONS=-server -Xss128m -Xmx8000m
-Dfile.encoding=UTF-8
-Dhazelcast.ignoreXxeProtectionFailures=true
--add-modules java.se
--add-exports java.base/jdk.internal.ref=ALL-UNNAMED
--add-opens java.base/java.lang=ALL-UNNAMED
--add-opens java.base/sun.nio.ch=ALL-UNNAMED
--add-opens java.management/sun.management=ALL-UNNAMED
--add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED
volumes:
- ./spring:/etc/application-config
ports:
- "8777:8777"

db:
image: 'postgis/postgis:13-master'
container_name: db
hostname: postgres
networks:
- tiamat-net
environment:
- POSTGRES_USER=tiamat
- POSTGRES_PASSWORD=tiamat
- POSTGRES_HOST=postgres
volumes:
- ./postgres/data:/var/lib/postgresql/data
ports:
- "5433:5432"
networks:
tiamat-net:
name: tiamat-postgres-db-shared-net

0 comments on commit fc2a4f2

Please sign in to comment.