Skip to content

Commit d57bd19

Browse files
Merge pull request #340 from nikolassv/docker-compose
Add docker-compose
2 parents fb3cbe1 + c24b502 commit d57bd19

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

docker-compose.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# To run the cloud version locally, first build the application using:
2+
#
3+
# ./mvnw clean package -Pcloud
4+
# -DpostgreSqlJdbcUrl="jdbc:postgresql://postgres:5432/postgres"
5+
# -DpostgreSqlUsername="cargotracker" -DpostgreSqlPassword="cargotracker"
6+
#
7+
# Then start the services with:
8+
#
9+
# docker-compose up
10+
#
11+
version: '3.8'
12+
13+
services:
14+
postgres:
15+
image: postgres:16
16+
environment:
17+
POSTGRES_USER: cargotracker
18+
POSTGRES_PASSWORD: cargotracker
19+
POSTGRES_DB: postgres
20+
ports:
21+
- "5432:5432"
22+
volumes:
23+
- postgres-data:/var/lib/postgresql/data
24+
25+
cargotracker:
26+
build: .
27+
ports:
28+
- "8080:8080"
29+
depends_on:
30+
- postgres
31+
environment:
32+
DB_HOST: postgres
33+
34+
volumes:
35+
postgres-data:

0 commit comments

Comments
 (0)