Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fe3270c

Browse files
author
徐新华
committed
modify cdn
1 parent a93e4ae commit fe3270c

File tree

13 files changed

+435
-425
lines changed

13 files changed

+435
-425
lines changed

.air.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ log = "air_errors.log"
1919
# Watch these filename extensions.
2020
include_ext = ["go", "tpl", "tmpl", "html"]
2121
# Ignore these filename extensions or directories.
22-
exclude_dir = ["log", "tmp", "vendor", "node_modules", "template", "static", "docs", "bin", "sitemap", "data", "config", "pid"]
22+
exclude_dir = ["log", "tmp", "vendor", "node_modules", "template", "static", "docs", "bin", "sitemap", "data", "config", "pid", "docker"]
2323
# There's no necessary to trigger build each time file changes if it's too frequency.
2424
delay = 1000 # ms
2525

cmd/server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ func IndexingServer() {
3131
}
3232

3333
if *manualIndex {
34+
logger.Infoln("manual indexing")
3435
indexing(true)
3536
}
3637

docker-compose.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,7 @@ services:
2424
restart: always
2525
nginx:
2626
container_name: nginx
27-
build: ./nginx
28-
depends_on:
29-
- play
30-
links:
31-
- play:play
27+
build: ./docker/nginx
3228
volumes:
3329
- /data/www:/data/www:rw
3430
- ./nginx/conf.d:/etc/nginx/conf.d:ro
@@ -69,4 +65,4 @@ services:
6965

7066
networks:
7167
app_net:
72-
external: true
68+
external: true

global/app.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ import (
3737
)
3838

3939
const (
40-
DefaultCDNHttp = "http://test.static.studygolang.com/"
41-
DefaultCDNHttps = "https://static.studygolang.com/"
40+
DefaultCDNHttp = "http://test.static.golangjob.cn/"
41+
DefaultCDNHttps = "https://static.golangjob.cn/"
4242
)
4343

4444
var Build string

sg.service

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[Unit]
2+
Description=studygolang
3+
4+
[Service]
5+
ExecStart=/data/www/studygolang/bin/studygolang
6+
ExecReload=/bin/kill -USR2 $MAINPID
7+
PIDFile=/data/www/studygolang/pid/studygolang.pid
8+
Restart=always
9+
User=xuxinhua
10+
Group=xuxinhua
11+
12+
[Install]
13+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)