mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Remove the custom entrypoint from the docker image
.. add documentation how to setup indices manually.
This commit is contained in:
parent
6cfa5fbdfc
commit
67f5dd53e2
@ -5,7 +5,6 @@ ARG BUILD_COMMIT
|
|||||||
ENV BUILD_COMMIT=$BUILD_COMMIT
|
ENV BUILD_COMMIT=$BUILD_COMMIT
|
||||||
|
|
||||||
COPY db_setup.sh /usr/local/bin/db_setup
|
COPY db_setup.sh /usr/local/bin/db_setup
|
||||||
COPY entrypoint.sh /docker-entrypoint-wrapper.sh
|
|
||||||
RUN apt-get update && apt-get -y install procps wget
|
RUN apt-get update && apt-get -y install wget htop
|
||||||
RUN wget https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/download/3.5.0.4/apoc-3.5.0.4-all.jar -P plugins/
|
RUN wget https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/download/3.5.0.4/apoc-3.5.0.4-all.jar -P plugins/
|
||||||
ENTRYPOINT ["/docker-entrypoint-wrapper.sh"]
|
|
||||||
|
|||||||
@ -18,6 +18,16 @@ docker-compose up
|
|||||||
You can access Neo4J through [http://localhost:7474/](http://localhost:7474/)
|
You can access Neo4J through [http://localhost:7474/](http://localhost:7474/)
|
||||||
for an interactive cypher shell and a visualization of the graph.
|
for an interactive cypher shell and a visualization of the graph.
|
||||||
|
|
||||||
|
### Database Indices and Constraints
|
||||||
|
|
||||||
|
Database indices and constraints need to be created when the database is
|
||||||
|
running. So start the container with the command above and run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose exec neo4j db_setup
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Installation without Docker
|
## Installation without Docker
|
||||||
|
|
||||||
Install the community edition of [Neo4j](https://neo4j.com/) along with the plugin
|
Install the community edition of [Neo4j](https://neo4j.com/) along with the plugin
|
||||||
@ -35,6 +45,20 @@ Then make sure to allow Apoc procedures by adding the following line to your Neo
|
|||||||
```
|
```
|
||||||
dbms.security.procedures.unrestricted=apoc.*
|
dbms.security.procedures.unrestricted=apoc.*
|
||||||
```
|
```
|
||||||
|
### Database Indices and Constraints
|
||||||
|
|
||||||
|
If you have `cypher-shell` available with your local installation of neo4j you
|
||||||
|
can run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# in folder neo4j/
|
||||||
|
$ cp .env.template .env
|
||||||
|
$ ./db_setup.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Otherwise, if you don't have `cypher-shell` available, copy the cypher
|
||||||
|
statements [from the `db_setup.sh` script](https://github.com/Human-Connection/Human-Connection/blob/master/neo4j/db_setup.sh) and paste the scripts into your
|
||||||
|
[database browser frontend](http://localhost:7474).
|
||||||
|
|
||||||
### Alternatives
|
### Alternatives
|
||||||
|
|
||||||
@ -50,21 +74,3 @@ in `backend/.env`.
|
|||||||
|
|
||||||
Start Neo4J and confirm the database is running at [http://localhost:7474](http://localhost:7474).
|
Start Neo4J and confirm the database is running at [http://localhost:7474](http://localhost:7474).
|
||||||
|
|
||||||
## Database Indices and Constraints
|
|
||||||
|
|
||||||
If you are not running our dedicated Neo4J [docker image](https://hub.docker.com/r/humanconnection/neo4j),
|
|
||||||
which is the case if you setup Neo4J locally without docker, then you have to
|
|
||||||
setup unique indices and database constraints manually.
|
|
||||||
|
|
||||||
If you have `cypher-shell` available with your local installation of neo4j you
|
|
||||||
can run:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# in folder neo4j/
|
|
||||||
$ cp .env.template .env
|
|
||||||
$ ./db_setup.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
Otherwise, if you don't have `cypher-shell` available, copy the cypher
|
|
||||||
statements [from the `db_setup.sh` script](https://github.com/Human-Connection/Human-Connection/blob/master/neo4j/db_setup.sh) and paste the scripts into your
|
|
||||||
[database browser frontend](http://localhost:7474).
|
|
||||||
|
|||||||
@ -1,21 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# credits: https://github.com/javamonkey79
|
|
||||||
# https://github.com/neo4j/docker-neo4j/issues/166
|
|
||||||
|
|
||||||
# turn on bash's job control
|
|
||||||
set -m
|
|
||||||
|
|
||||||
# Start the primary process and put it in the background
|
|
||||||
/docker-entrypoint.sh neo4j &
|
|
||||||
|
|
||||||
# Start the helper process
|
|
||||||
db_setup
|
|
||||||
|
|
||||||
# the my_helper_process might need to know how to wait on the
|
|
||||||
# primary process to start before it does its work and returns
|
|
||||||
|
|
||||||
|
|
||||||
# now we bring the primary process back into the foreground
|
|
||||||
# and leave it there
|
|
||||||
fg %1
|
|
||||||
Loading…
x
Reference in New Issue
Block a user