|
@@ -12,7 +12,7 @@ Should you have problems or questions in the process, contact us at [gin@g-node.
|
|
|
Even if you have no trouble, we would love to receive your feedback or just learn from you that you have just set up
|
|
|
your own GIN!
|
|
|
|
|
|
-### Setup prerequisites and preparations
|
|
|
+#### Setup prerequisites and preparations
|
|
|
|
|
|
`docker` and `docker-compose` are required on the system. If the gin instance should be available within the network
|
|
|
or to the outside, we recommend using the GIN instance together with an Apache2 server.
|
|
@@ -27,7 +27,7 @@ If you are new to docker and docker-compose or deploying services with it, it mi
|
|
|
a simplified setup using `docker` on your local machine. For a description on how to deploy a full server with customized
|
|
|
content, please see the section "Deploy and run full server" below.
|
|
|
|
|
|
-### Set up GIN with Docker
|
|
|
+#### Set up GIN with Docker
|
|
|
The easiest way to set up a GIN server is via pre-built docker containers. You will need a working Docker installation.
|
|
|
|
|
|
You start by downloading the docker image for GIN by typing:
|
|
@@ -60,7 +60,7 @@ docker run -v /somefolder/:/data -p 3000:3000 -p 2222:22 -e GITUID="1001" -e GIT
|
|
|
|
|
|
where `GITUID` and `GITGID` are followed by the numerical user and group ids respectively.
|
|
|
|
|
|
-### Update an existing container
|
|
|
+#### Update an existing container
|
|
|
To update an existing GIN docker installation you simply need to pull in the changes:
|
|
|
```bash
|
|
|
docker pull gnode/gin-web:latest
|
|
@@ -96,14 +96,14 @@ ambiguous, please let us know at [gin@g-node.org](mailto:gin@g-node.org).
|
|
|
|
|
|
This setup will require the files found in the [in-house-gin](https://gin.g-node.org/G-Node/in-house-gin) repository.
|
|
|
|
|
|
-### Required group and user
|
|
|
+#### Required group and user
|
|
|
To smoothly work with a docker deployment, the following groups and users should be set up.
|
|
|
- prepare a dedicated deployment group e.g., "ginservice" group if it does not exist.
|
|
|
- create a dedicated deployment user e.g., "ginuser".
|
|
|
- for any further setup, all required directories and files should be created with this user/group as owner.
|
|
|
- make sure to add all users that are running docker-compose or need access to project files to the docker and deploy groups.
|
|
|
|
|
|
-### Required directories
|
|
|
+#### Required directories
|
|
|
|
|
|
The current setup requires certain directories to be available before the containers have started. These directories will contain and persist
|
|
|
- the postgres database
|
|
@@ -191,7 +191,7 @@ echo "COMPOSE_PROJECT_NAME=gin" > $DIR_GINROOT/gin-dockerfile/.env
|
|
|
echo "POSTGRES_PASSWORD=${PGRES_PASS}" > $DIR_GINCONFIG/postgres/pgressecrets.env
|
|
|
```
|
|
|
|
|
|
-### Prepare docker-compose file
|
|
|
+#### Prepare docker-compose file
|
|
|
|
|
|
The `resources` folder contains an example docker-compose file to set up an in-house GIN instance.
|
|
|
|
|
@@ -206,7 +206,7 @@ Update the docker-compose file to match your requirements:
|
|
|
- `web:volumes: ../gindata/..`
|
|
|
- `db:volumes: ../gindata/..`
|
|
|
|
|
|
-### Adjust file permissions
|
|
|
+#### Adjust file permissions
|
|
|
|
|
|
Change all file permissions of the GIN root directory to ginservice group to ensure the docker services
|
|
|
have access to the directories and change group permissions to write.
|
|
@@ -216,7 +216,7 @@ chown -R ginuser:ginservice $DIR_GINROOT
|
|
|
chmod -R g+rw $DIR_GINROOT
|
|
|
```
|
|
|
|
|
|
-### Docker container and initial GIN setup
|
|
|
+#### Docker container and initial GIN setup
|
|
|
|
|
|
You can use the `gnode/gin-web:latest` docker container to run the in-house GIN; this is set as default in the example
|
|
|
`docker-compose.yml` file but can be changed to another container.
|
|
@@ -296,7 +296,7 @@ that the services have set up different CSRF tokens. This results in the message
|
|
|
any webform data via the web browser. In this case either purge the browser cache or use a different
|
|
|
browser all-together.
|
|
|
|
|
|
-### Customize the in-house GIN content
|
|
|
+#### Customize the in-house GIN content
|
|
|
|
|
|
Apart from changing the main page, as well as header and footer content as described above, most custom pages are hosted
|
|
|
via the Wiki of a specific GIN repository wiki: `Service/Info`. By default the service links and expects the following
|
|
@@ -321,7 +321,7 @@ To create and edit these on your GIN instance
|
|
|
the wiki repository after it has been initialized:
|
|
|
`git clone ssh://git@[your domain]:2121/Service/Info.wiki.git`
|
|
|
|
|
|
-### GIN client setup
|
|
|
+#### GIN client setup
|
|
|
|
|
|
By default the [GIN-client](https://gin.g-node.org/G-Node/Info/wiki/GIN+CLI+Setup), a command line tool to work with GIN,
|
|
|
is set up to work with the GIN server at gin.g-node.org. To use the GIN-Client with an in-house version of gin a couple of
|
|
@@ -337,7 +337,7 @@ gin use-server alias-in-house
|
|
|
gin login
|
|
|
```
|
|
|
|
|
|
-### Avoid exposing debug service
|
|
|
+#### Avoid exposing debug service
|
|
|
|
|
|
Macaron toolbox, which runs alongside GOGS, exposes a minimal debug control panel at `/debug` (https://github.com/gogs/gogs/issues/5578).
|
|
|
This control panel can be used to run profiling operations and dump information about the running server. Currently,
|
|
@@ -349,7 +349,7 @@ console:
|
|
|
</Location>
|
|
|
```
|
|
|
|
|
|
-### Build your own docker container from source
|
|
|
+## Build your own docker container from source
|
|
|
|
|
|
If the customizations above are not sufficient for your service, you can also clone our [GIN github repository](https://github.com/G-Node/gogs),
|
|
|
directly edit the source code and build your own docker container (run from the root of the repository):
|
|
@@ -357,7 +357,8 @@ directly edit the source code and build your own docker container (run from the
|
|
|
docker build -t [organization-name]/[container-name] .
|
|
|
```
|
|
|
|
|
|
-### Further reading
|
|
|
+## Further reading
|
|
|
|
|
|
Since GIN is based on GOGS, the official documentation for running GOGS in a container is also relevant:
|
|
|
[Docker for GOGS](https://github.com/gogs/gogs/tree/main/docker)
|
|
|
+
|