diff --git a/.github/workflows/dhis2-verify-app.yml b/.github/workflows/dhis2-verify-app.yml index b355cc931..04586d9e5 100644 --- a/.github/workflows/dhis2-verify-app.yml +++ b/.github/workflows/dhis2-verify-app.yml @@ -97,7 +97,7 @@ jobs: - name: End-to-End tests uses: cypress-io/github-action@v5 with: - start: npx --yes @dhis2/cli-cluster up 2.40 --channel dev --db-version 2.40 --seed, yarn start:nobrowser + start: docker compose up, yarn start:nobrowser wait-on: 'http://localhost:8080/dhis-web-commons/security/login.action, http://localhost:3000' wait-on-timeout: 600 record: true diff --git a/dhis.conf b/dhis.conf new file mode 100644 index 000000000..bf80f6074 --- /dev/null +++ b/dhis.conf @@ -0,0 +1,14 @@ +connection.dialect = org.hibernate.dialect.PostgreSQLDialect +connection.driver_class = org.postgresql.Driver +connection.url = jdbc:postgresql://db/dhis2 +connection.username = dhis +connection.password = dhis +# Database schema behavior, can be validate, update, create, create-drop +connection.schema = update + +# encryption.password = xxxx +metadata.audit.persist = on + +# URLs for specifying a custom app hub, these are the defaults +#apphub.base.url = https://apps.dhis2.org +#apphub.api.url = https://apps.dhis2.org/api diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..280a4cf6c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,23 @@ +version: "3.8" + +services: + web: + image: dhis2/core:2.39.1 + ports: + - 127.0.0.1:8080:8080 # DHIS2 + volumes: + - ./dhis.conf:/opt/dhis2/dhis.conf:ro + depends_on: + db: + condition: service_healthy + + db: + image: radnov/dhis2-sl-db:2.39.1 + ports: + - 127.0.0.1:5432:5432 + healthcheck: + test: ["CMD-SHELL", "PGPASSWORD=dhis psql --no-password --quiet --username dhis postgres://127.0.0.1/dhis2 -p 5432 --command \"SELECT 'ok'\" > /dev/null"] + start_period: 30s + interval: 1s + timeout: 3s + retries: 5