feta/Dockerfile

47 lines
1.3 KiB
Docker
Raw Normal View History

2019-10-24 10:38:16 +00:00
FROM golang:1.13 as builder
WORKDIR /go/src/git.eeqj.de/sneak/feta
2019-10-24 10:38:16 +00:00
COPY . .
2019-11-05 23:32:09 +00:00
#RUN make lint && make build
2019-11-05 03:15:25 +00:00
RUN make build
2019-10-24 10:38:16 +00:00
2019-10-25 16:38:45 +00:00
WORKDIR /go
2020-02-05 09:04:32 +00:00
RUN tar cfz go-src.tgz src && du -sh *
2019-10-25 16:50:32 +00:00
2019-10-24 10:38:16 +00:00
# this container doesn't do anything except hold the build artifact
# and make sure it compiles.
FROM alpine
54 viper.SetDefault("Debug", false)
55 viper.SetDefault("TootsToDisk", false)
56 viper.SetDefault("TootsToDB", true)
57 viper.SetDefault("HostDiscoveryParallelism", 5)
58 viper.SetDefault("FSStorageLocation", os.ExpandEnv("$HOME/Library/ApplicationSupport/feta/tootarchive.d"))
59 viper.SetDefault("DBStorageLocation", os.ExpandEnv("$HOME/Library/ApplicationSupport/feta/feta.state.db"))
60 viper.SetDefault("LogReportInterval", time.Second*10)
# here are the levers
ENV FETA_HOSTDISCOVERYPARALLELISM 20
ENV FETA_FSSTORAGELOCATION /state/tootstore
ENV FETA_DBSTORAGELOCATION /state/feta.state.sqlite3
ENV FETA_TOOTSTODISK false
ENV FETA_TOOTSTODB true
ENV FETA_DEBUG false
COPY --from=builder /go/src/git.eeqj.de/sneak/feta/feta /bin/feta
RUN mkdir /app && mkdir /state
COPY --from=builder /go/src/git.eeqj.de/sneak/feta/view /app/view
2019-10-24 10:38:16 +00:00
2019-10-25 16:38:45 +00:00
# put the source in there too for safekeeping
2020-02-05 09:04:32 +00:00
COPY --from=builder /go/go-src.tgz /usr/local/src/go-src.tgz
2019-10-25 16:38:45 +00:00
VOLUME /state
WORKDIR /app
2019-11-03 10:56:50 +00:00
CMD /bin/feta
2019-10-24 10:38:16 +00:00
# FIXME add testing