mirror of
https://github.com/JustKato/drive-health.git
synced 2026-03-04 16:39:45 +02:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 44d4237bec | |||
| f2c84fb6b2 | |||
| 4f50819f92 | |||
| 6117157598 | |||
| 79e44bd88a |
8
.dockerignore
Normal file
8
.dockerignore
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
/**
|
||||||
|
|
||||||
|
!main.go
|
||||||
|
!/lib
|
||||||
|
!/templates
|
||||||
|
!/static
|
||||||
|
!/go.mod
|
||||||
|
!/go.sum
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
# Build Stage
|
# Build Stage
|
||||||
FROM debian:bullseye
|
FROM debian:bullseye-slim
|
||||||
ENV IS_DOCKER TRUE
|
ENV IS_DOCKER TRUE
|
||||||
|
|
||||||
|
LABEL org.opencontainers.image.source https://github.com/JustKato/drive-health
|
||||||
|
|
||||||
# Install build dependencies and runtime dependencies
|
# Install build dependencies and runtime dependencies
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
gcc \
|
gcc \
|
||||||
@@ -22,10 +24,9 @@ ENV PATH /usr/local/go/bin:$PATH
|
|||||||
ENV GOPATH=/go
|
ENV GOPATH=/go
|
||||||
ENV PATH=$GOPATH/bin:$PATH
|
ENV PATH=$GOPATH/bin:$PATH
|
||||||
ENV GO111MODULE=on
|
ENV GO111MODULE=on
|
||||||
ENV DIST_DIR=/app
|
|
||||||
|
|
||||||
# Create the directory and set it as the working directory
|
# Create the directory and set it as the working directory
|
||||||
WORKDIR $DIST_DIR
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy the Go files and download dependencies
|
# Copy the Go files and download dependencies
|
||||||
COPY go.mod go.sum ./
|
COPY go.mod go.sum ./
|
||||||
|
|||||||
17
docker-compose.prod.yml
Normal file
17
docker-compose.prod.yml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
version: "3.8"
|
||||||
|
|
||||||
|
services:
|
||||||
|
drive-health:
|
||||||
|
# Latest image pull, mention the specific version here please.
|
||||||
|
image: ghcr.io/justkato/drive-health:latest
|
||||||
|
# Restart in case of crashing
|
||||||
|
restart: unless-stopped
|
||||||
|
# Load environment variables from .env file
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
# Mount the volume to the local drive
|
||||||
|
volumes:
|
||||||
|
- ./data:/data
|
||||||
|
# Setup application ports
|
||||||
|
ports:
|
||||||
|
- 5003:8080
|
||||||
Reference in New Issue
Block a user