Use `test` image tag for docker-compose tests

Also adds the ability to overwrite the image in docker-compose.yml,
which allows the CI build to use the same image for all docker tests.
The default is still 'benbusby/whoogle-search' though.
main
Ben Busby 2022-01-25 12:42:24 -07:00
parent 863cbb2b8d
commit 2e3c647591
No known key found for this signature in database
GPG Key ID: B9B7231E01D924A1
3 changed files with 3 additions and 3 deletions

View File

@ -23,6 +23,6 @@ jobs:
- name: build and test (docker-compose) - name: build and test (docker-compose)
run: | run: |
docker rm -f whoogle-search-nocompose docker rm -f whoogle-search-nocompose
docker-compose up --detach WHOOGLE_IMAGE="whoogle-search:test" docker-compose up --detach
sleep 15 sleep 15
docker exec whoogle-search curl -f http://localhost:5000/healthz || exit 1 docker exec whoogle-search curl -f http://localhost:5000/healthz || exit 1

View File

@ -21,6 +21,6 @@ jobs:
- name: build and test (docker-compose) - name: build and test (docker-compose)
run: | run: |
docker rm -f whoogle-search-nocompose docker rm -f whoogle-search-nocompose
docker-compose up --detach WHOOGLE_IMAGE="whoogle-search:test" docker-compose up --detach
sleep 15 sleep 15
docker exec whoogle-search curl -f http://localhost:5000/healthz || exit 1 docker exec whoogle-search curl -f http://localhost:5000/healthz || exit 1

View File

@ -4,7 +4,7 @@ version: "2.4"
services: services:
whoogle-search: whoogle-search:
image: benbusby/whoogle-search image: ${WHOOGLE_IMAGE:-benbusby/whoogle-search}
container_name: whoogle-search container_name: whoogle-search
restart: unless-stopped restart: unless-stopped
pids_limit: 50 pids_limit: 50