Skip to content

Commit

Permalink
chore: adjust the directory structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Trevor-Lan committed Oct 3, 2022
1 parent 4f36ad5 commit 8a26d96
Show file tree
Hide file tree
Showing 112 changed files with 24 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ server{
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://ark-admin-api:8001;
proxy_pass http://api:8001;
}
}
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions deploy/web/web.conf → build/deploy/web/web.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@ server {
listen 8080;

location / {
# same docker config
root /web;
index index.html;
# support history mode
try_files $uri $uri/ /index.html;
}

#禁止访问的文件或目录
location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)
{
return 404;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions build/dev/tools/api.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env sh

dir=$1
api=$2

# shellcheck disable=SC2086
goctl api go -api "${dir}"/${api} -dir ${dir} -home /server/build/dev/goctl
2 changes: 1 addition & 1 deletion dev/tools/model.sh → build/dev/tools/model.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ mysql="root:root@tcp(mysql:3306)/ark_admin"
table=$1
dir=$2

goctl model mysql datasource -url="${mysql}" -table="${table}" -c -dir "${dir}" -home /server/dev/goctl
goctl model mysql datasource -url="${mysql}" -table="${table}" -c -dir "${dir}" -home /server/build/dev/goctl
7 changes: 0 additions & 7 deletions dev/tools/api.sh

This file was deleted.

14 changes: 7 additions & 7 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ services:
environment:
- TZ=Asia/Shanghai
volumes:
- ./deploy/gateway:/etc/nginx/conf.d
- ./build/deploy/gateway:/etc/nginx/conf.d
- ./data/gateway/log:/var/log/nginx
ports:
- "8000:8000"

ark-admin-web:
web:
image: arklnk/ark-admin:web
container_name: ark-admin-web
container_name: web
volumes:
- ./deploy/web:/etc/nginx/conf.d
- ./build/deploy/web:/etc/nginx/conf.d
ports:
- "80:8080"
restart: always

ark-admin-api:
api:
image: arklnk/go:1.18-goctl1.4.1
container_name: ark-admin-api
container_name: api
working_dir: /server
volumes:
- ./:/server
Expand All @@ -43,7 +43,7 @@ services:
- "3306:3306"
volumes:
- ./data/mysql/data:/var/lib/mysql
- ./deploy/sql/:/docker-entrypoint-initdb.d/
- ./build/deploy/sql/:/docker-entrypoint-initdb.d/
privileged: true
restart: always

Expand Down
16 changes: 8 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@ services:
environment:
- TZ=Asia/Shanghai
volumes:
- ./deploy/gateway:/etc/nginx/conf.d
- ./build/deploy/gateway:/etc/nginx/conf.d
- ./data/gateway/log:/var/log/nginx
restart: always
privileged: true

ark-admin-web:
web:
image: arklnk/ark-admin:web
container_name: ark-admin-web
container_name: web
volumes:
- ./deploy/web:/etc/nginx/conf.d
- ./build/deploy/web:/etc/nginx/conf.d
ports:
- "80:8080"
restart: always

ark-admin-api:
api:
image: arklnk/ark-admin:api
container_name: ark-admin-api
container_name: api
volumes:
- ./deploy/service/core/etc:/app/etc
- ./build/deploy/service/core/etc:/app/etc
- ./data/service/logs:/app/logs
restart: always

Expand All @@ -42,7 +42,7 @@ services:
- "3306:3306"
volumes:
- ./data/mysql/data:/var/lib/mysql
- ./deploy/sql/:/docker-entrypoint-initdb.d/
- ./build/deploy/sql/:/docker-entrypoint-initdb.d/
privileged: true
restart: always

Expand Down

0 comments on commit 8a26d96

Please sign in to comment.