diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b0f6b7b0..84cf6eb6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,5 +3,5 @@ cd frontend npm run dist go mod vendor -go run backend/cmd/fasten/fasten.go start --config ./config.yaml --debug +go run backend/cmd/fasten/fasten.go start --config ./config.example.yaml --debug ``` diff --git a/Dockerfile b/Dockerfile index f887f214..4ec35ece 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,13 +15,20 @@ RUN go mod vendor \ && go generate ./... \ && go vet ./... \ && go test ./... - RUN CGO_ENABLED=0 go build -o /go/bin/fasten ./backend/cmd/fasten/ -FROM gcr.io/distroless/static-debian11 +# create folder structure +RUN mkdir -p /opt/fasten/db \ + mkdir -p /opt/fasten/web \ + mkdir -p /opt/fasten/config -COPY --from=frontend-build /usr/src/fastenhealth/dist /opt/fasten/dist + + +FROM gcr.io/distroless/static-debian11 +WORKDIR /opt/fasten/ +COPY --from=backend-build /opt/fasten/ /opt/fasten/ +COPY --from=frontend-build /usr/src/fastenhealth/dist /opt/fasten/web COPY --from=backend-build /go/bin/fasten /opt/fasten/fasten COPY LICENSE.md /opt/fasten/LICENSE.md -COPY config.yaml /opt/fasten/config.yaml +COPY config.yaml /opt/fasten/config/config.yaml CMD ["/opt/fasten/fasten"] diff --git a/config.yaml b/config.yaml index 043c0175..4804fcec 100644 --- a/config.yaml +++ b/config.yaml @@ -10,7 +10,7 @@ web: # used to encrypt/validate JWT session key (used for authentication) encryptionkey: 'changethissupersecretkey' listen: - port: 9090 + port: 8080 host: 0.0.0.0 # if you're using a reverse proxy like apache/nginx, you can override this value to serve fasten on a subpath. @@ -21,8 +21,7 @@ web: src: # the location on the filesystem where webapp javascript + css is located frontend: -# path: /opt/fasten/web - path: ./dist + path: /opt/fasten/web log: file: '' #absolute or relative paths allowed, eg. web.log