Merge branch 'master' of github.com:gogits/gogs into dev
Conflicts: dockerfiles/README.md
This commit is contained in:
commit
7e36bf448d
|
@ -2,6 +2,7 @@
|
||||||
path = github.com/gogits/gogs
|
path = github.com/gogits/gogs
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
code.google.com/p/mahonia =
|
||||||
github.com/Unknwon/cae =
|
github.com/Unknwon/cae =
|
||||||
github.com/Unknwon/com =
|
github.com/Unknwon/com =
|
||||||
github.com/Unknwon/goconfig =
|
github.com/Unknwon/goconfig =
|
||||||
|
@ -23,6 +24,7 @@ github.com/macaron-contrib/i18n =
|
||||||
github.com/macaron-contrib/session =
|
github.com/macaron-contrib/session =
|
||||||
github.com/macaron-contrib/toolbox =
|
github.com/macaron-contrib/toolbox =
|
||||||
github.com/nfnt/resize =
|
github.com/nfnt/resize =
|
||||||
|
github.com/saintfish/chardet =
|
||||||
|
|
||||||
[res]
|
[res]
|
||||||
include = conf|etc|public|scripts|templates
|
include = conf|etc|public|scripts|templates
|
||||||
|
|
|
@ -2,4 +2,5 @@ language: go
|
||||||
|
|
||||||
go:
|
go:
|
||||||
- 1.2
|
- 1.2
|
||||||
|
- 1.3
|
||||||
- tip
|
- tip
|
|
@ -0,0 +1,40 @@
|
||||||
|
### 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:
|
||||||
|
|
||||||
|
```
|
||||||
|
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.
|
||||||
|
```
|
||||||
|
|
||||||
|
And run:
|
||||||
|
```
|
||||||
|
cd dockerfiles
|
||||||
|
./build.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
The build might take some time, just be patient. After it finishes, you will receive the message:
|
||||||
|
|
||||||
|
```
|
||||||
|
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):
|
||||||
|
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:
|
||||||
|
|
||||||
|
```
|
||||||
|
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:
|
||||||
|
|
||||||
|
```
|
||||||
|
http://YOUR_HOST_IP:YOUR_HOST_PORT
|
||||||
|
```
|
||||||
|
|
||||||
|
Let's 'gogs'!
|
||||||
|
Ouya~
|
2
gogs.go
2
gogs.go
|
@ -17,7 +17,7 @@ import (
|
||||||
"github.com/gogits/gogs/modules/setting"
|
"github.com/gogits/gogs/modules/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
const APP_VER = "0.4.9.0830 Alpha"
|
const APP_VER = "0.4.9.0831 Beta"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
|
|
|
@ -99,7 +99,7 @@ func GetWebhooksByRepoId(repoId int64) (ws []*Webhook, err error) {
|
||||||
|
|
||||||
// UpdateWebhook updates information of webhook.
|
// UpdateWebhook updates information of webhook.
|
||||||
func UpdateWebhook(w *Webhook) error {
|
func UpdateWebhook(w *Webhook) error {
|
||||||
_, err := x.AllCols().Update(w)
|
_, err := x.Id(w.Id).AllCols().Update(w)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,6 @@ RUN cd /usr/local/go/src && ./make.bash --no-clean 2>&1
|
||||||
RUN go get -u -d github.com/gogits/gogs
|
RUN go get -u -d github.com/gogits/gogs
|
||||||
RUN cd $GOPATH/src/github.com/gogits/gogs && git checkout dev && git pull origin dev && go install && go build -tags redis
|
RUN cd $GOPATH/src/github.com/gogits/gogs && git checkout dev && git pull origin dev && go install && go build -tags redis
|
||||||
|
|
||||||
# Clean all the unused packages
|
|
||||||
RUN apt-get autoremove -y
|
|
||||||
RUN apt-get clean all
|
|
||||||
|
|
||||||
# Add the deploy script to the docker image and assign execution permission to it.
|
# Add the deploy script to the docker image and assign execution permission to it.
|
||||||
ADD ./deploy.sh /
|
ADD ./deploy.sh /
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
0.4.9.0830 Alpha
|
0.4.9.0831 Beta
|
Loading…
Reference in New Issue