This means a decent scale refactor but ends with our testing being much simpler Key changes: * single Dockerfile for all services * tests moved into docker up so don't need to be run locally * configurations moved to environment
48 lines
1 KiB
YAML
48 lines
1 KiB
YAML
version: '3'
|
|
|
|
volumes:
|
|
persistent-data:
|
|
|
|
services:
|
|
rove-accountant:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: rove:latest
|
|
ports:
|
|
- "8081:8081"
|
|
environment:
|
|
- HOST_ADDRESS=:8081
|
|
- DATA_PATH=/mnt/rove-server
|
|
volumes:
|
|
- persistent-data:/mnt/rove-server:rw
|
|
command: [ ./rove-accountant ]
|
|
|
|
rove-server:
|
|
depends_on: [ rove-accountant ]
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: rove:latest
|
|
ports:
|
|
- "80:80"
|
|
environment:
|
|
- HOST_ADDRESS=:80
|
|
- DATA_PATH=/mnt/rove-server
|
|
- ACCOUNTANT_ADDRESS=rove-accountant:8081
|
|
volumes:
|
|
- persistent-data:/mnt/rove-server:rw
|
|
|
|
rove-tests:
|
|
depends_on: [ rove-server ]
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: rove:latest
|
|
environment:
|
|
- ACCOUNTANT_ADDRESS=rove-accountant:8081
|
|
- ROVE_SERVER_ADDRESS=rove-server:80
|
|
command: [ "go", "test", "-v", "./...", "--tags=integration", "-cover", "-coverprofile=/tmp/c.out", "-count", "1" ]
|
|
|
|
|
|
|