add dockerfile
This commit is contained in:
parent
f7fa2e0282
commit
431ad01355
|
|
@ -0,0 +1,14 @@
|
||||||
|
version: "3.9"
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
container_name: beancount-gs
|
||||||
|
image: xdbin/beancount-gs:0.0.1
|
||||||
|
ports:
|
||||||
|
- "10000:80"
|
||||||
|
# volumes 挂载目录会导 /app/public/icons 中的图标被覆盖,这里将默认图标在挂载后重新拷贝图标
|
||||||
|
command: >
|
||||||
|
sh -c "cp -rn /app/public/default_icons/* /app/public/icons && ./beancount-gs -p 80"
|
||||||
|
volumes:
|
||||||
|
- "${dataPath:-/data/beancount}:/beancount"
|
||||||
|
- "${dataPath:-/data/beancount}/icons:/app/public/icons"
|
||||||
|
- "${dataPath:-/data/beancount}/config:/app/config"
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
FROM golang:1.17.3
|
||||||
|
|
||||||
|
ENV GO111MODULE=on \
|
||||||
|
GOPROXY=https://goproxy.cn,direct \
|
||||||
|
GIN_MODE=release \
|
||||||
|
PORT=80
|
||||||
|
|
||||||
|
# install beancount
|
||||||
|
RUN apt-get update || : && apt-get install python3.5 python3-pip -y
|
||||||
|
RUN pip3 install beancount -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY . .
|
||||||
|
COPY public/icons ./public/default_icons
|
||||||
|
RUN go build .
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
@ -3,11 +3,11 @@ package script
|
||||||
import "os"
|
import "os"
|
||||||
|
|
||||||
func GetServerConfigFilePath() string {
|
func GetServerConfigFilePath() string {
|
||||||
return "./config.json"
|
return "./config/config.json"
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetServerWhiteListFilePath() string {
|
func GetServerWhiteListFilePath() string {
|
||||||
return "./white_list.json"
|
return "./config/white_list.json"
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetServerLedgerConfigFilePath() string {
|
func GetServerLedgerConfigFilePath() string {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue