neo4j / docker-neo4j

Docker Images for the Neo4j Graph Database
Apache License 2.0
336 stars 171 forks source link

Missing proper health check #434

Open macnibblet opened 1 year ago

macnibblet commented 1 year ago

Guidelines

Using neo4j in a gitlab-ci pipeline introduces 30s delay because their is no healthcheck

WARNING: Service neo4j:5.6.0-community is already created. Ignoring.
Waiting for services to be up and running (timeout 30 seconds)...
*** WARNING: Service runner-5edk7eqb-project-19693690-concurrent-0-86a2392dc1e210cf-neo4j-2 probably didn't start properly.
Health check error:
service "runner-5edk7eqb-project-19693690-concurrent-0-86a2392dc1e210cf-neo4j-2-wait-for-service" timeout
Health check container logs:
Service container logs:
2023-04-05T01:53:43.[18](https://gitlab.com/tigerhall/backend/core/-/jobs/4062981132#L18)5560265Z Changed password for user 'neo4j'. IMPORTANT: this change will only take effect if performed before the database is started for the first time.
[20](https://gitlab.com/tigerhall/backend/core/-/jobs/4062981132#L20)[23](https://gitlab.com/tigerhall/backend/core/-/jobs/4062981132#L23)-04-05T01:53:45.641761280Z 2023-04-05 01:53:45.639+0000 WARN  Unrecognized setting. No declared setting with name: USERNAME.
2023-04-05T01:53:45.644093668Z 2023-04-05 01:53:45.643+0000 WARN  Unrecognized setting. No declared setting with name: URI.
2023-04-05T01:53:45.644318279Z 2023-04-05 01:53:45.644+0000 WARN  Unrecognized setting. No declared setting with name: PASSWORD.
2023-04-05T01:53:45.655386403Z 2023-04-05 01:53:45.655+0000 INFO  Starting...
2023-04-05T01:53:46.118145[24](https://gitlab.com/tigerhall/backend/core/-/jobs/4062981132#L24)9Z 2023-04-05 01:53:46.117+0000 INFO  This instance is ServerId{f5e20e7a} (f5e20e7a-d4a4-4e74-8840-8d77707884a5)
2023-04-05T01:53:46.9280[25](https://gitlab.com/tigerhall/backend/core/-/jobs/4062981132#L25)370Z 2023-04-05 01:53:46.927+0000 INFO  ======== Neo4j 5.6.0 ========
2023-04-05T01:53:48.8747407[26](https://gitlab.com/tigerhall/backend/core/-/jobs/4062981132#L26)Z 2023-04-05 01:53:48.874+0000 INFO  Bolt enabled on 0.0.0.0:7687.
2023-04-05T01:53:49.567606434Z 2023-04-05 01:53:49.567+0000 INFO  Remote interface available at http://localhost:7474/
2023-04-05T01:53:49.570953156Z 2023-04-05 01:53:49.570+0000 INFO  id: E49A0BCAC0B3B026CF42CE3568E2A441E5A33583D6D3301065F55CFD1039645C
2023-04-05T01:53:49.571[28](https://gitlab.com/tigerhall/backend/core/-/jobs/4062981132#L28)0953Z 2023-04-05 01:53:49.571+0000 INFO  name: system
2023-04-05T01:53:49.571552062Z 2023-04-05 01:53:49.571+0000 INFO  creationDate: 2023-04-05T01:53:47.46Z
2023-04-05T01:53:49.571771390Z 2023-04-05 01:53:49.571+0000 INFO  Started.
*********

Sample gitlab-ci file

test:
  stage: test
  services:
    - name: neo4j:5.6.0-community
      alias: neo4j

  script:
    - echo "hello world"

  variables:
    NEO4J_AUTH: neo4j/helloWorld