From 371a1c9d4c8c6bb27070f3a2476c8b223cfad3ef Mon Sep 17 00:00:00 2001 From: Alessandro Fontana Date: Tue, 7 Oct 2025 13:13:33 +0200 Subject: [PATCH] feat: make docker-compose use PORT env variable and .env file - Add env_file: .env to load environment variables - Use ${PORT:-3000} for port mapping instead of hardcoded 3000 - Maintains backward compatibility with default port 3000 --- docker-compose.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index b2aa5c2b9..11afc923f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,13 +2,15 @@ services: server: build: context: . + env_file: + - .env volumes: - db_data_sqlite:/var/lib/kutt - custom:/kutt/custom environment: DB_FILENAME: "/var/lib/kutt/data.sqlite" ports: - - 3000:3000 + - ${PORT:-3000}:${PORT:-3000} volumes: db_data_sqlite: custom: \ No newline at end of file