Skip to content

Commit eb14c0c

Browse files
committed
build: add docker run script for container deployment
1 parent 86a2703 commit eb14c0c

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

docker-run.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# Build the Docker image if needed
4+
# mvn clean package
5+
# docker build -t reitti/reitti:test .
6+
7+
# Run the container with custom UID/GID
8+
docker run -p 8080:8080 \
9+
-e APP_UID=1001 \
10+
-e APP_GID=1001 \
11+
-e SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/reitti \
12+
reitti/reitti:test
13+
14+
# To verify the user ID inside the container, run:
15+
# docker exec -it $(docker ps -q --filter ancestor=reitti/reitti:test) sh -c "id"

0 commit comments

Comments
 (0)