setup demo
This commit is contained in:
parent
f554173a84
commit
ebcab69d85
|
@ -0,0 +1,11 @@
|
|||
paisa.db
|
||||
paisa.yaml
|
||||
paisa
|
||||
web/static/dist*
|
||||
node_modules
|
||||
example.ledger
|
||||
personal.ledger
|
||||
Dockerfile
|
||||
fly.toml
|
||||
.dockerignore
|
||||
.gitignore
|
|
@ -0,0 +1,22 @@
|
|||
FROM node:18-alpine3.16 as web
|
||||
WORKDIR /usr/src/paisa
|
||||
COPY . .
|
||||
RUN npm install && \
|
||||
./node_modules/.bin/esbuild web/src/index.ts --bundle --outfile=web/static/dist.js
|
||||
|
||||
FROM golang:1.18-alpine3.16 as go
|
||||
WORKDIR /usr/src/paisa
|
||||
RUN apk --no-cache add sqlite gcc g++
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download && go mod verify
|
||||
COPY . .
|
||||
COPY --from=web /usr/src/paisa/web/static ./web/static
|
||||
RUN CGO_ENABLED=1 go build
|
||||
|
||||
FROM alpine:3.16
|
||||
RUN apk --no-cache add ca-certificates ledger
|
||||
WORKDIR /root/
|
||||
COPY --from=go /usr/src/paisa ./
|
||||
RUN ./paisa init && ./paisa update
|
||||
EXPOSE 7500
|
||||
CMD ["./paisa", "serve"]
|
|
@ -0,0 +1,36 @@
|
|||
app = "paisa-demo"
|
||||
kill_signal = "SIGINT"
|
||||
kill_timeout = 5
|
||||
processes = []
|
||||
|
||||
[env]
|
||||
|
||||
[experimental]
|
||||
allowed_public_ports = []
|
||||
auto_rollback = true
|
||||
|
||||
[[services]]
|
||||
http_checks = []
|
||||
internal_port = 7500
|
||||
processes = ["app"]
|
||||
protocol = "tcp"
|
||||
script_checks = []
|
||||
[services.concurrency]
|
||||
hard_limit = 25
|
||||
soft_limit = 20
|
||||
type = "connections"
|
||||
|
||||
[[services.ports]]
|
||||
force_https = true
|
||||
handlers = ["http"]
|
||||
port = 80
|
||||
|
||||
[[services.ports]]
|
||||
handlers = ["tls", "http"]
|
||||
port = 443
|
||||
|
||||
[[services.tcp_checks]]
|
||||
grace_period = "1s"
|
||||
interval = "15s"
|
||||
restart_limit = 0
|
||||
timeout = "2s"
|
Loading…
Reference in New Issue