3 Commits

Author SHA1 Message Date
44d4237bec Fixed Static folder push 2024-01-22 02:34:27 +02:00
f2c84fb6b2 Fixed Dockerfile 2024-01-22 02:23:43 +02:00
4f50819f92 Production docker-compose.yml updates 2024-01-22 02:12:18 +02:00
3 changed files with 17 additions and 7 deletions

8
.dockerignore Normal file
View File

@@ -0,0 +1,8 @@
/**
!main.go
!/lib
!/templates
!/static
!/go.mod
!/go.sum

View File

@@ -1,5 +1,5 @@
# 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 LABEL org.opencontainers.image.source https://github.com/JustKato/drive-health
@@ -24,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 ./

View File

@@ -2,13 +2,16 @@ version: "3.8"
services: services:
drive-health: drive-health:
# Build the current image # Latest image pull, mention the specific version here please.
image: ghcr.io/justkato/drive-health:latest image: ghcr.io/justkato/drive-health:latest
# Read straight from the .env file, or use the environment path # Restart in case of crashing
restart: unless-stopped
# Load environment variables from .env file
env_file: env_file:
- .env - .env
# Mount the volume to the local drive
volumes: volumes:
- ./dev_data:/data - ./data:/data
# Setup application ports # Setup application ports
ports: ports:
- 8080:8080 - 5003:8080