`./assemble_blocks.sh` will look in `blocks` for subdirectories.
`./assemble_blocks.sh` will look in `blocks` for subdirectories.
In the subdirectories there are three relevant files: `Dockerfile`, `config` and `fig`.
In the subdirectories there are three relevant files: `Dockerfile`, `config` and `docker-compose`.
`Dockerfile` will be copied to `docker/` (also means last `Dockerfile` wins).
`Dockerfile` will be copied to `docker/` (also means last `Dockerfile` wins).
The `config` file contains lines which will in the gogs docker container end up in `$GOGS_PATH/custom/config/app.ini` and by this gogs will be configured.
The `config` file contains lines which will in the gogs docker container end up in `$GOGS_PATH/custom/config/app.ini` and by this gogs will be configured.
Here you can define things like the MySQL server for your database block.
Here you can define things like the MySQL server for your database block.
The `fig` file will just be added to `fig.yml`, which is used by fig to manage your containers.
The `docker-compose` file will just be added to `docker-compose.yml`, which is used by docker-compose to manage your containers.
This includes container linking!
This includes container linking!
Just have a look at them and it will be clear how to write your own blocks.
Just have a look at them and it will be clear how to write your own blocks.
Just some things
Just some things
- all files (`Dockerfile`, `fig` and `config`) are optional
- all files (`Dockerfile`, `docker-compose` and `config`) are optional
- the gogs block should always be the first block
- the gogs block should always be the first block
Currently the blocks are designed that, the blocks that start with `docker` pull in the base docker image.
Currently the blocks are designed that, the blocks that start with `docker` pull in the base docker image.
@ -57,14 +57,11 @@ Here is a more elaborated example
This will set up four containters and link them proberly. One for each of
This will set up four containters and link them proberly. One for each of
- gogs
- database (postgresql)
- cache (redis)
docker-compose
- session (mysql)
- session (mysql)
WARNING: This will not work at the Moment! MySQL session is broken!
WARNING: This will not work at the Moment! MySQL session is broken!
@ -73,7 +70,7 @@ WARNING: This will not work at the Moment! MySQL session is broken!
Remark
Remark
------
------
After you execute `assemble_blocks.sh` you should always trigger `fig build` to inculde the the new init script `init_gogs.sh` in the docker image.
After you execute `assemble_blocks.sh` you should always trigger `docker-compose build` to inculde the the new init script `init_gogs.sh` in the docker image.
If you want to use another GoGS docker file, but keep everything else the same, you can create a block, e.g. `docker_gogs_custom`, with only a `Dockerfile` and call
If you want to use another GoGS docker file, but keep everything else the same, you can create a block, e.g. `docker_gogs_custom`, with only a `Dockerfile` and call
@ -86,4 +83,4 @@ This will pull in the `Dockerfile` from `docker_gogs` instead of the one from `d
`Dockerfile`s for the `master` and `dev` branch are provided as `docker_gogs` and `docker_gogs_dev`
`Dockerfile`s for the `master` and `dev` branch are provided as `docker_gogs` and `docker_gogs_dev`