2021-12-05 05:10:59 +00:00
|
|
|
# syntax=docker/dockerfile:1
|
2022-01-18 15:25:51 +00:00
|
|
|
FROM golang:1.17.3 AS builder
|
2021-12-05 05:10:59 +00:00
|
|
|
|
|
|
|
|
ENV GO111MODULE=on \
|
|
|
|
|
GOPROXY=https://goproxy.cn,direct \
|
|
|
|
|
GIN_MODE=release \
|
|
|
|
|
PORT=80
|
|
|
|
|
|
2022-01-18 15:25:51 +00:00
|
|
|
WORKDIR /builder
|
2022-02-09 19:18:35 +00:00
|
|
|
|
2021-12-05 05:10:59 +00:00
|
|
|
COPY . .
|
2022-02-09 20:12:50 +00:00
|
|
|
COPY public/icons ./public/default_icons
|
2021-12-05 05:10:59 +00:00
|
|
|
RUN go build .
|
|
|
|
|
|
2022-02-09 18:29:23 +00:00
|
|
|
FROM python:3.8
|
2022-02-09 20:12:50 +00:00
|
|
|
RUN python3 -m pip install -U pip setuptools wheel -i https://pypi.tuna.tsinghua.edu.cn/simple
|
|
|
|
|
|
|
|
|
|
COPY ./beancount-2.3.4-cp38-cp38-linux_x86_64.whl /tmp
|
|
|
|
|
RUN pip3 install /tmp/beancount-2.3.4-cp38-cp38-linux_x86_64.whl -i https://pypi.tuna.tsinghua.edu.cn/simple
|
|
|
|
|
|
|
|
|
|
COPY ./fava-1.18-py3-none-any.whl /tmp
|
|
|
|
|
RUN pip3 install /tmp/fava-1.18-py3-none-any.whl -i https://pypi.tuna.tsinghua.edu.cn/simple
|
2022-02-09 19:18:35 +00:00
|
|
|
|
2022-01-18 15:25:51 +00:00
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
COPY --from=builder ./builder/public ./public
|
2022-02-09 20:12:50 +00:00
|
|
|
COPY --from=builder ./builder/config ./config
|
|
|
|
|
COPY --from=builder ./builder/template ./template
|
|
|
|
|
COPY --from=builder ./builder/beancount-gs* ./
|
2022-01-18 15:25:51 +00:00
|
|
|
|
2021-12-05 05:10:59 +00:00
|
|
|
EXPOSE 80
|