podman based project from now on

This commit is contained in:
Priec
2026-06-29 19:44:17 +02:00
parent 551ff3aedc
commit 3bfc798a9e
6 changed files with 54 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
target
node_modules
Dockerfile
Podmanfile
.dockerignore
docker-compose.prod.yml
Makefile

View File

@@ -2,7 +2,7 @@
[package]
name = "kompress_eshop"
version = "0.1.0"
version = "0.5.0"
edition = "2024"
publish = false
default-run = "kompress-eshop-cli"

View File

@@ -1,4 +1,5 @@
COMPOSE = docker compose -f docker-compose.prod.yml --env-file .env.production
COMPOSE ?= docker compose -f docker-compose.prod.yml --env-file .env.production
PODMAN_COMPOSE ?= podman compose -f podman-compose.prod.yml --env-file .env.production
# --- Frontend (Tailwind v4 + PenguinUI) -----------------------------
# Uses the Tailwind v4 standalone binary (no Node required at runtime).
@@ -13,7 +14,7 @@ else
TW_TARGET = tailwindcss-linux-x64
endif
.PHONY: up down restart logs build ps css css-watch tailwind
.PHONY: up down restart logs build ps podman-up podman-down podman-restart podman-logs podman-build podman-ps css css-watch tailwind
$(TW):
@mkdir -p bin
@@ -45,3 +46,20 @@ build:
ps:
$(COMPOSE) ps
podman-up:
$(PODMAN_COMPOSE) up -d --build
podman-down:
$(PODMAN_COMPOSE) down
podman-restart: podman-down podman-up
podman-logs:
$(PODMAN_COMPOSE) logs -f --tail=100
podman-build:
$(PODMAN_COMPOSE) build --no-cache
podman-ps:
$(PODMAN_COMPOSE) ps

View File

@@ -5,7 +5,7 @@ WORKDIR /usr/src
COPY . .
RUN cargo build --release --bin kompress-cli
RUN cargo build --release --bin kompress-eshop-cli
FROM debian:bookworm-slim
@@ -17,9 +17,9 @@ WORKDIR /usr/app
COPY --from=builder /usr/src/assets assets
COPY --from=builder /usr/src/config config
COPY --from=builder /usr/src/target/release/kompress-cli kompress-cli
COPY --from=builder /usr/src/target/release/kompress-eshop-cli kompress-eshop-cli
ENV LOCO_ENV=production
EXPOSE 5150
ENTRYPOINT ["/usr/app/kompress-cli"]
ENTRYPOINT ["/usr/app/kompress-eshop-cli"]
CMD ["start"]

View File

@@ -3,7 +3,7 @@ services:
container_name: kompress
build:
context: .
dockerfile: Dockerfile
dockerfile: Podmanfile
extra_hosts:
- "host.docker.internal:host-gateway"
env_file:

28
podman-compose.prod.yml Normal file
View File

@@ -0,0 +1,28 @@
services:
kompress:
container_name: kompress
build:
context: .
dockerfile: Podmanfile
env_file:
- .env.production
volumes:
- kompress_eshop_data:/usr/app/data
networks:
- kompress_eshop-net
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:5150/_ping"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
networks:
kompress_eshop-net:
external: true
volumes:
kompress_eshop_data:
external: true
name: kompress_eshop_data