From fce94e7ffd4819895c565d5abc38944854600705 Mon Sep 17 00:00:00 2001 From: Boris D Date: Tue, 14 Oct 2025 15:07:24 +0300 Subject: [PATCH] chore: remove deprecated environment and Docker configuration files --- .env example.docker | 15 ----------- .env.example | 3 +++ .env.testing.example | 64 -------------------------------------------- Dockerfile | 64 -------------------------------------------- docker-compose.yml | 62 ------------------------------------------ 5 files changed, 3 insertions(+), 205 deletions(-) delete mode 100644 .env example.docker delete mode 100644 .env.testing.example delete mode 100644 Dockerfile delete mode 100644 docker-compose.yml diff --git a/.env example.docker b/.env example.docker deleted file mode 100644 index cf6422e..0000000 --- a/.env example.docker +++ /dev/null @@ -1,15 +0,0 @@ -# Docker Environment Configuration -NODE_ENV=development - -# Application Configuration -APP_PORT=3000 - -# Database Configuration -DB_HOST=mariadb -DB_PORT=3306 -DB_USERNAME=app_user -DB_PASSWORD=app_password -DB_DATABASE=low_code_engine -DB_ROOT_PASSWORD=rootpassword - -DB_PORT=3309 diff --git a/.env.example b/.env.example index 5831193..af91919 100644 --- a/.env.example +++ b/.env.example @@ -5,6 +5,9 @@ DB_USERNAME=root DB_PASSWORD=your_password_here DB_DATABASE=low_code_engine +REDIS_HOST=localhost +REDIS_PORT=6379 + # Application Configuration NODE_ENV=development PORT=3054 diff --git a/.env.testing.example b/.env.testing.example deleted file mode 100644 index 8df2c2e..0000000 --- a/.env.testing.example +++ /dev/null @@ -1,64 +0,0 @@ -# Environment Variables for Testing Deployments - -# Copy this file to .env in your deployment directory - -# ================================ -# APPLICATION SETTINGS -# ================================ -NODE_ENV=testing -APP_PORT=3123 # Will be dynamically set to 3000 + PR_NUMBER - -# ================================ -# DATABASE CONFIGURATION -# ================================ -DB_HOST=mariadb -DB_PORT=3306 -DB_DATABASE=low_code_engine_pr_123 # Will be dynamically set -DB_USERNAME=app_user -DB_PASSWORD=your_strong_password_here -DB_ROOT_PASSWORD=your_strong_root_password_here - -# ================================ -# REDIS CONFIGURATION -# ================================ -REDIS_HOST=redis -REDIS_PORT=6379 - -# ================================ -# API TOKENS (if needed) -# ================================ -# API_TOKEN_SECRET=your_api_token_secret -# ADMIN_TOKEN=your_admin_token - -# ================================ -# EXTERNAL SERVICES (if any) -# ================================ -# EXTERNAL_API_URL=https://api.example.com -# EXTERNAL_API_KEY=your_external_api_key - -# ================================ -# LOGGING & MONITORING -# ================================ -LOG_LEVEL=debug -# SENTRY_DSN=https://your-sentry-dsn@sentry.io/project-id - -# ================================ -# PERFORMANCE SETTINGS -# ================================ -# MAX_CONNECTIONS=100 -# TIMEOUT=30000 - -# ================================ -# FEATURE FLAGS (if any) -# ================================ -# ENABLE_FEATURE_X=true -# ENABLE_DEBUG_MODE=true - -# ================================ -# NOTES FOR DEPLOYMENT -# ================================ -# - This file is automatically generated by GitHub Actions -# - PR_NUMBER will be substituted with actual PR number -# - Ports will be calculated as BASE_PORT + PR_NUMBER -# - Database name will include PR number for isolation -# - Do not commit this file with real secrets! \ No newline at end of file diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 9f3ce36..0000000 --- a/Dockerfile +++ /dev/null @@ -1,64 +0,0 @@ -# Multi-stage build for production optimization -FROM node:18-alpine AS development - -# Set working directory -WORKDIR /usr/src/app - -# Copy package files -COPY package*.json yarn.lock ./ - -# Install dependencies -RUN yarn install --frozen-lockfile - -# Copy source code -COPY . . - -# Expose port -EXPOSE 3000 - -# Development command -CMD ["yarn", "start:dev"] - -# Production build stage -FROM node:18-alpine AS build - -WORKDIR /usr/src/app - -# Copy package files -COPY package*.json yarn.lock ./ - -# Install dependencies -RUN yarn install --frozen-lockfile - -# Copy source code -COPY . . - -# Build the application -RUN yarn build - -# Production stage -FROM node:18-alpine AS production - -WORKDIR /usr/src/app - -# Copy package files -COPY package*.json yarn.lock ./ - -# Install only production dependencies -RUN yarn install --frozen-lockfile --production && yarn cache clean - -# Copy built application -COPY --from=build /usr/src/app/dist ./dist - -# Create non-root user -RUN addgroup -g 1001 -S nodejs -RUN adduser -S nestjs -u 1001 - -# Change ownership of the app directory -USER nestjs - -# Expose port -EXPOSE 3000 - -# Production command -CMD ["node", "dist/main"] diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index e5755dd..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,62 +0,0 @@ -version: "3.8" - -services: - # MariaDB Database - mariadb: - image: mariadb:10.11 - container_name: low-code-engine-mariadb - restart: unless-stopped - environment: - MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-rootpassword} - MYSQL_DATABASE: ${DB_DATABASE:-low_code_engine} - MYSQL_USER: ${DB_USERNAME:-app_user} - MYSQL_PASSWORD: ${DB_PASSWORD:-app_password} - ports: - - "${DB_PORT:-3306}:3306" - volumes: - - mariadb_data:/var/lib/mysql - - ./docker/mariadb/init:/docker-entrypoint-initdb.d - networks: - - app-network - healthcheck: - test: - [ - "CMD", - "mysqladmin", - "ping", - "-h", - "localhost", - "-u", - "root", - "-p${DB_ROOT_PASSWORD:-rootpassword}", - ] - timeout: 5s - retries: 10 - interval: 10s - - # Redis Cache - redis: - image: redis:7-alpine - container_name: low-code-engine-redis - restart: unless-stopped - ports: - - "${REDIS_PORT:-6379}:6379" - volumes: - - redis_data:/data - networks: - - app-network - healthcheck: - test: ["CMD", "redis-cli", "ping"] - timeout: 5s - retries: 10 - interval: 10s - -volumes: - mariadb_data: - driver: local - redis_data: - driver: local - -networks: - app-network: - driver: bridge