-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.dev.yaml
53 lines (50 loc) · 1.38 KB
/
compose.dev.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
networks:
testcontainers-network:
driver: bridge
services:
postgres:
image: 'postgres:14'
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_USER=${POSTGRES_USER}
ports:
- '${POSTGRES_PORT}:${POSTGRES_PORT}'
networks:
- testcontainers-network
settlements-enrichment-service:
build:
context: .
dockerfile: Dockerfile
image: settlements-enrichment-service
depends_on:
- postgres
environment:
- SPRING_PROFILES_ACTIVE=dev
- SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:${POSTGRES_PORT}/${POSTGRES_DB}
- SPRING_DATASOURCE_USERNAME=${SPRING_DATASOURCE_USERNAME}
- SPRING_DATASOURCE_PASSWORD=${SPRING_DATASOURCE_PASSWORD}
- TESTCONTAINERS_HOST_OVERRIDE=host.docker.internal
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "${SERVER_PORT}:${SERVER_PORT}"
networks:
- testcontainers-network
tests:
image: maven:3
stop_signal: SIGKILL
stdin_open: true
tty: true
working_dir: /app
volumes:
- .:/app
- /var/run/docker.sock:/var/run/docker.sock
# Maven cache (optional)
- ~/.m2:/root/.m2
command: mvn test
environment:
- SPRING_PROFILES_ACTIVE=test
- TESTCONTAINERS_HOST_OVERRIDE=host.docker.internal
networks:
- testcontainers-network