mirror of
https://github.com/roundcube/roundcubemail-docker.git
synced 2025-10-27 05:50:59 +01:00
* Include unzip package to avoid composer warnings * Separate actions to test and publish * Exclude builds on changes to README.md and examples
62 lines
1.8 KiB
YAML
62 lines
1.8 KiB
YAML
version: "2"
|
|
|
|
services:
|
|
roundcubemail:
|
|
image: ${ROUNDCUBEMAIL_TEST_IMAGE:-roundcube/roundcubemail:latest-apache}
|
|
healthcheck:
|
|
# To make it obvious in logs "ping=ping" is added
|
|
test: ["CMD", "curl", "--fail", "http://localhost/?ping=ping"]
|
|
interval: 2s
|
|
timeout: 3s
|
|
retries: 30
|
|
start_period: 10s
|
|
depends_on:
|
|
roundcubedb:
|
|
condition: service_healthy
|
|
networks:
|
|
roundcube_test_net:
|
|
aliases:
|
|
- roundcubemail
|
|
environment:
|
|
- ROUNDCUBEMAIL_DB_TYPE=pgsql
|
|
- ROUNDCUBEMAIL_DB_HOST=roundcubedb # same as pgsql container name
|
|
- ROUNDCUBEMAIL_DB_NAME=roundcube # same as pgsql POSTGRES_DB env name
|
|
- ROUNDCUBEMAIL_DB_USER=roundcube # same as pgsql POSTGRES_USER env name
|
|
- ROUNDCUBEMAIL_DB_PASSWORD=roundcube # same as pgsql POSTGRES_PASSWORD env name
|
|
|
|
roundcubedb:
|
|
image: postgres:alpine
|
|
healthcheck:
|
|
# "roundcube" is the POSTGRES_USER value
|
|
test: ["CMD-SHELL", "pg_isready -U roundcube"]
|
|
interval: 2s
|
|
timeout: 3s
|
|
retries: 30
|
|
start_period: 10s
|
|
networks:
|
|
roundcube_test_net:
|
|
aliases:
|
|
- roundcubedb
|
|
environment:
|
|
- POSTGRES_DB=roundcube
|
|
- POSTGRES_USER=roundcube
|
|
- POSTGRES_PASSWORD=roundcube
|
|
|
|
# A name that matches Docker auto test naming, you want a name here is one
|
|
# Source: https://docs.docker.com/docker-hub/builds/automated-testing/#set-up-automated-test-files
|
|
sut:
|
|
image: alpine:3.14
|
|
networks:
|
|
roundcube_test_net:
|
|
depends_on:
|
|
roundcubemail:
|
|
condition: service_healthy
|
|
roundcubedb:
|
|
condition: service_healthy
|
|
command: /tests/run.sh
|
|
volumes:
|
|
- ./run.sh:/tests/run.sh:ro
|
|
working_dir: /tests
|
|
networks:
|
|
roundcube_test_net:
|