add dockerignore
This commit is contained in:
parent
c92c269275
commit
1516169ef7
3 changed files with 41 additions and 0 deletions
7
.dockerignore
Normal file
7
.dockerignore
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
.git
|
||||
.env
|
||||
*.db
|
||||
*.db-wal
|
||||
*.db-shm
|
||||
bin/
|
||||
st-agent-worker
|
||||
13
Dockerfile
Normal file
13
Dockerfile
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
FROM golang:1.23-alpine AS build
|
||||
WORKDIR /src
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 go build -o /worker .
|
||||
|
||||
FROM alpine:3.20
|
||||
RUN apk add --no-cache ca-certificates tzdata
|
||||
COPY --from=build /worker /worker
|
||||
RUN mkdir -p /data
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["/worker"]
|
||||
21
docker-compose.yml
Normal file
21
docker-compose.yml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
services:
|
||||
worker:
|
||||
build: .
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
ST_API_KEY: ${ST_API_KEY}
|
||||
WEBHOOK_SECRET: ${WEBHOOK_SECRET}
|
||||
ELIGIBLE_APPOINTMENTS: ${ELIGIBLE_APPOINTMENTS}
|
||||
DB_PATH: /data/worker.db
|
||||
DRY_RUN: ${DRY_RUN:-}
|
||||
volumes:
|
||||
- worker-data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-qO-", "http://localhost:8080/healthz"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 120s
|
||||
|
||||
volumes:
|
||||
worker-data:
|
||||
Loading…
Add table
Add a link
Reference in a new issue