Dockerize application
This commit is contained in:
parent
1779ee5c8e
commit
bb73bf0009
|
@ -0,0 +1,8 @@
|
|||
.dockerignore
|
||||
.drone.yml
|
||||
.git*
|
||||
Dockerfile
|
||||
config.json
|
||||
data
|
||||
db.sqlite3
|
||||
matrix-pretix
|
13
.drone.yml
13
.drone.yml
|
@ -26,3 +26,16 @@ steps:
|
|||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: push
|
||||
image: plugins/docker
|
||||
settings:
|
||||
auto_tag: yes
|
||||
password:
|
||||
from_secret: api_key
|
||||
registry: git.luj0ga.de
|
||||
repo: git.luj0ga.de/luca/matrix-prometheus
|
||||
username: _
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
FROM golang:1.20 AS builder
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt-get install -y libolm-dev
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
COPY . .
|
||||
RUN go build -ldflags="-s -w" -o matrix-pretix -v .
|
||||
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN groupadd --gid 999 --system matrix-pretix && useradd --gid 999 --system --uid 999 matrix-pretix
|
||||
|
||||
RUN apt-get update && apt-get install -y ca-certificates libolm3
|
||||
|
||||
COPY --from=builder /build/matrix-pretix /usr/local/bin/matrix-pretix
|
||||
|
||||
USER matrix-pretix
|
||||
|
||||
VOLUME /data
|
||||
WORKDIR /data
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["/usr/local/bin/matrix-pretix", "/config.json"]
|
Loading…
Reference in New Issue