0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-16 15:01:07 +01:00

Merge branch 'dev' of github.com:gogits/gogs into dev

Conflicts:
	templates/status/500.tmpl
This commit is contained in:
Unknwon 2014-07-26 00:25:43 -04:00
commit 3f38ff6c09
3 changed files with 31 additions and 22 deletions

View file

@ -1,14 +1,16 @@
### Install Gogs With Docker ### Install Gogs With Docker
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' DB_TYPE="YOUR_DB_TYPE" # type of database, supports either 'mysql' or 'postgres'
MEM_TYPE="YOUR_MEM_TYPE" # type of memory database, support 'redis' and 'memcache' MEM_TYPE="YOUR_MEM_TYPE" # type of memory database, supports either 'redis' or 'memcache'
DB_PASSWORD="YOUR_DB_PASSWORD" # The database password. DB_PASSWORD="YOUR_DB_PASSWORD" # The database password
DB_RUN_NAME="YOUR_DB_RUN_NAME" # The --name option value when run the database image. 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 when run the mem 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 on host, which will be redirected to the port 3000 inside gogs container. 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): Now we have the MySQL image(running) and gogs image, use the follow command to start gogs service:
docker run -i -t --link YOUR_DB_RUN_NAME:db --link YOUR_MEM_RUN_NAME:mem -p YOUR_HOST_PORT:3000 gogits/gogs docker run -i -t --link YOUR_DB_RUN_NAME:db --link YOUR_MEM_RUN_NAME:mem -p YOUR_HOST_PORT:3000 gogits/gogs
``` ```
Just follow the message, run: To run the container, just copy the above command:
``` ```
docker run -i -t --link YOUR_DB_RUN_NAME:db --link YOUR_MEM_RUN_NAME:mem -p YOUR_HOST_PORT:3000 gogits/gogs docker run -i -t --link YOUR_DB_RUN_NAME:db --link YOUR_MEM_RUN_NAME:mem -p YOUR_HOST_PORT:3000 gogits/gogs
``` ```
Now we have gogs running! Open the browser and navigate to: Now gogs should be running! Open your browser and navigate to:
``` ```
http://YOUR_HOST_IP:YOUR_HOST_PORT http://YOUR_HOST_IP:YOUR_HOST_PORT
``` ```
During the installation procedure, use the following information:
- The database type should be whichever `DB_TYPE` you selected above
- The database host should be either `db:5432` or `db:3306` for PostgreSQL and
MySQL respectively
- The `RUN_USER` should be whichever user you're running the container with.
Ideally that's `git`, but your individual configuration may vary
- Everything else is configured like a normal gogs installation
Let's 'gogs'! Let's 'gogs'!
Ouya~ Ouya~

View file

@ -1,7 +0,0 @@
{{template "base/head" .}}
{{template "base/navbar" .}}
<div id="body" class="container">
<p>An error is occurred : {{.ErrorMsg}}</p>
<p>Application Version: {{AppVer}}</p>
</div>
{{template "base/footer" .}}

View file

@ -4,7 +4,7 @@
<p style="margin-top: 100px"><img src="/img/500.png" alt="500"/></p> <p style="margin-top: 100px"><img src="/img/500.png" alt="500"/></p>
<hr/> <hr/>
<br> <br>
{{if .ErrorMsg}}<p>An error is occurred : {{.ErrorMsg}}</p>{{end}} {{if .ErrorMsg}}<p>An error has occurred : {{.ErrorMsg}}</p>{{end}}
<p>Application Version: {{AppVer}}</p> <p>Application Version: {{AppVer}}</p>
</div> </div>
{{template "ng/base/footer" .}} {{template "ng/base/footer" .}}