Skip to content

Commit dd052a8

Browse files
committed
优化docker-compose的配置文件
1 parent b0077e1 commit dd052a8

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed

.docker-compose/nginx/conf.d/my.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
server {
2-
listen 8000;
2+
listen 8080;
33
server_name localhost;
44

55
#charset koi8-r;

.docker-compose/shell/server-handle.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ zap:
2626
# redis configuration
2727
redis:
2828
db: 0
29-
addr: 'redis:6379'
29+
addr: '177.7.0.14:6379'
3030
password: ''
3131
3232
# email configuration
@@ -48,9 +48,9 @@ system:
4848
env: 'public' # Change to "develop" to skip authentication for development mode
4949
addr: 8888
5050
db-type: 'mysql'
51-
oss-type: 'qiniu'
51+
oss-type: 'local'
5252
config-env: 'GVA_CONFIG'
53-
need-init-data: false
53+
need-init-data: true
5454
use-multipoint: false
5555
5656
# captcha configuration
@@ -61,11 +61,11 @@ captcha:
6161
6262
# mysql connect configuration
6363
mysql:
64-
path: mysql
64+
path: '177.7.0.13:3306'
6565
config: 'charset=utf8mb4&parseTime=True&loc=Local'
6666
db-name: 'qmPlus'
6767
username: 'root'
68-
password: 'gdkid,,..'
68+
password: 'Aa@6447985'
6969
max-idle-conns: 10
7070
max-open-conns: 10
7171
log-mode: false

docker-compose.yaml

+5-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ services:
1515
container_name: gva-web
1616
restart: always
1717
ports:
18-
- '8000:8000'
18+
- '8080:8080'
1919
depends_on:
2020
- server
2121
command: [ 'nginx-debug', '-g', 'daemon off;' ]
@@ -34,6 +34,9 @@ services:
3434
depends_on:
3535
- mysql
3636
- redis
37+
links:
38+
- mysql
39+
- redis
3740
networks:
3841
network:
3942
ipv4_address: 177.7.0.12
@@ -57,7 +60,7 @@ services:
5760
container_name: gva-redis # 容器名
5861
restart: always
5962
ports:
60-
- '6379:6379'
63+
- '16379:6379'
6164
networks:
6265
network:
6366
ipv4_address: 177.7.0.14

dockerfile_server

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ COPY --from=0 /go/src/gin-vue-admin/server ./
2424
COPY --from=0 /go/src/gin-vue-admin/config.yaml ./
2525
COPY --from=0 /go/src/gin-vue-admin/resource ./resource
2626

27+
EXPOSE 8888
28+
2729
ENTRYPOINT ./server
2830

2931
# 根据Dockerfile生成Docker镜像

server/config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ system:
4141
env: 'public' # Change to "develop" to skip authentication for development mode
4242
addr: 8888
4343
db-type: 'mysql'
44-
oss-type: 'qiniu'
44+
oss-type: 'local'
4545
config-env: 'GVA_CONFIG'
4646
need-init-data: false
4747
use-multipoint: false
@@ -58,7 +58,7 @@ mysql:
5858
config: 'charset=utf8mb4&parseTime=True&loc=Local'
5959
db-name: 'qmPlus'
6060
username: 'root'
61-
password: 'gdkid,,..'
61+
password: 'Aa@6447985'
6262
max-idle-conns: 10
6363
max-open-conns: 10
6464
log-mode: false

0 commit comments

Comments
 (0)