Deploying gogs in [Docker](http://www.docker.io/) is just as easy as eating a pie, what you do is just open the `dockerfiles/build.sh` file, replace the configs:
Deploying gogs using [Docker](http://www.docker.io/) is as easy as pie. Simple
open the `/dockerfiles/build.sh` file and replace the initial configuration
settings:
```
```
DB_TYPE="YOUR_DB_TYPE" # type of database, support 'mysql' and 'postgres'
MEM_TYPE="YOUR_MEM_TYPE" # type of memory database, support 'redis' and 'memcache'
DB_PASSWORD="YOUR_DB_PASSWORD" # The database password.
DB_RUN_NAME="YOUR_DB_RUN_NAME" # The --name option value when run the database image.
MEM_RUN_NAME="YOUR_MEM_RUN_NAME" # The --name option value when run the mem database image.
HOST_PORT="YOUR_HOST_PORT" # The port on host, which will be redirected to the port 3000 inside gogs container.
DB_TYPE="YOUR_DB_TYPE" # type of database, supports either 'mysql' or 'postgres'
MEM_TYPE="YOUR_MEM_TYPE" # type of memory database, supports either 'redis' or 'memcache'
DB_PASSWORD="YOUR_DB_PASSWORD" # The database password
DB_RUN_NAME="YOUR_DB_RUN_NAME" # The --name option value to use when running the database image
MEM_RUN_NAME="YOUR_MEM_RUN_NAME" # The --name option value to use when running the memory database image
HOST_PORT="YOUR_HOST_PORT" # The port to expose the app on (redirected to 3000 inside the gogs container)
```
```
And run:
And run:
@ -17,24 +19,38 @@ cd dockerfiles
./build.sh
./build.sh
```
```
The build might take some time, just be paient. After it finishes, you will receive the message:
The build will take some time, just be patient. After it finishes, it will
display a message that looks like this (the content may be different, depending
on your configuration options):
```
```
Now we have the MySQL image(running) and gogs image, use the follow command to start gogs service( the content might be different, according to your own configs):