mirror of
https://github.com/Receipt-Wrangler/receipt-wrangler-api.git
synced 2026-01-12 22:20:08 -06:00
41 lines
602 B
Docker
41 lines
602 B
Docker
# Pull in source code to container
|
|
FROM golang:1.23.2-bullseye
|
|
WORKDIR .
|
|
RUN mkdir api
|
|
WORKDIR api
|
|
COPY . .
|
|
|
|
# Add local bin to path for python dependencies
|
|
ENV PATH="~/.local/bin:${PATH}"
|
|
|
|
# Set env
|
|
ENV ENV="prod"
|
|
|
|
# Set base path
|
|
ENV BASE_PATH="/go/api"
|
|
|
|
# Install tesseract dependencies
|
|
RUN ./set-up-dependencies.sh
|
|
|
|
# Build api
|
|
WORKDIR /go/api
|
|
RUN go build
|
|
|
|
# Set up data volume
|
|
RUN mkdir data
|
|
VOLUME /go/api/data
|
|
|
|
# Set up temp directory
|
|
RUN mkdir temp
|
|
|
|
# Set up sqlite volume
|
|
RUN mkdir sqlite
|
|
VOLUME /go/api/sqlite
|
|
|
|
# Add logs volume
|
|
RUN mkdir logs
|
|
VOLUME /go/api/logs
|
|
|
|
# Expose port
|
|
EXPOSE 8081
|