the beginning of the idiots
This commit is contained in:
34
qwen/php/docker/Dockerfile
Normal file
34
qwen/php/docker/Dockerfile
Normal file
@@ -0,0 +1,34 @@
|
||||
FROM php:8.2-apache
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
git \
|
||||
curl \
|
||||
libpng-dev \
|
||||
libonig-dev \
|
||||
libxml2-dev \
|
||||
zip \
|
||||
unzip \
|
||||
libpq-dev
|
||||
|
||||
# Clear cache
|
||||
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install PHP extensions
|
||||
RUN docker-php-ext-install pdo_mysql pdo_pgsql mbstring exif pcntl bcmath gd
|
||||
|
||||
# Get latest Composer
|
||||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /var/www/html
|
||||
|
||||
# Set permissions
|
||||
RUN chown -R www-data:www-data /var/www/html
|
||||
RUN a2enmod rewrite
|
||||
|
||||
# Expose port
|
||||
EXPOSE 80
|
||||
|
||||
# Start Apache
|
||||
CMD ["apache2-foreground"]
|
||||
79
qwen/php/docker/init.sql
Normal file
79
qwen/php/docker/init.sql
Normal file
@@ -0,0 +1,79 @@
|
||||
-- Database initialization for MerchantsOfHope Recruiting Platform
|
||||
|
||||
-- Create extension for UUID if not exists
|
||||
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
|
||||
|
||||
-- Create tenants table
|
||||
CREATE TABLE IF NOT EXISTS tenants (
|
||||
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||
name VARCHAR(255) NOT NULL,
|
||||
subdomain VARCHAR(255) UNIQUE NOT NULL,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- Create users table
|
||||
CREATE TABLE IF NOT EXISTS users (
|
||||
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||
tenant_id UUID REFERENCES tenants(id),
|
||||
email VARCHAR(255) UNIQUE NOT NULL,
|
||||
password_hash VARCHAR(255),
|
||||
first_name VARCHAR(255),
|
||||
last_name VARCHAR(255),
|
||||
role VARCHAR(50) DEFAULT 'job_seeker', -- job_seeker, job_provider, admin
|
||||
provider VARCHAR(50), -- google, facebook, oidc, local
|
||||
provider_id VARCHAR(255),
|
||||
is_active BOOLEAN DEFAULT true,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- Create job_positions table
|
||||
CREATE TABLE IF NOT EXISTS job_positions (
|
||||
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||
tenant_id UUID REFERENCES tenants(id),
|
||||
title VARCHAR(255) NOT NULL,
|
||||
description TEXT,
|
||||
location VARCHAR(255),
|
||||
employment_type VARCHAR(50), -- full_time, part_time, contract, internship
|
||||
salary_min DECIMAL(10,2),
|
||||
salary_max DECIMAL(10,2),
|
||||
posted_by UUID REFERENCES users(id),
|
||||
status VARCHAR(50) DEFAULT 'draft', -- draft, published, closed
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- Create applications table
|
||||
CREATE TABLE IF NOT EXISTS applications (
|
||||
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||
job_position_id UUID REFERENCES job_positions(id),
|
||||
applicant_id UUID REFERENCES users(id),
|
||||
resume_path VARCHAR(500),
|
||||
cover_letter TEXT,
|
||||
status VARCHAR(50) DEFAULT 'submitted', -- submitted, under_review, accepted, rejected
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- Create indexes for better performance
|
||||
CREATE INDEX IF NOT EXISTS idx_users_tenant_id ON users(tenant_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_users_email ON users(email);
|
||||
CREATE INDEX IF NOT EXISTS idx_job_positions_tenant_id ON job_positions(tenant_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_job_positions_status ON job_positions(status);
|
||||
CREATE INDEX IF NOT EXISTS idx_applications_job_position_id ON applications(job_position_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_applications_applicant_id ON applications(applicant_id);
|
||||
|
||||
-- Insert a default tenant for testing
|
||||
INSERT INTO tenants (name, subdomain) VALUES ('TSYS Group', 'tsys') ON CONFLICT (subdomain) DO NOTHING;
|
||||
|
||||
-- Insert a default admin user for testing
|
||||
INSERT INTO users (tenant_id, email, password_hash, first_name, last_name, role)
|
||||
SELECT
|
||||
(SELECT id FROM tenants WHERE subdomain = 'tsys'),
|
||||
'admin@merchantsOfHope.org',
|
||||
'$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', -- 'password'
|
||||
'Admin',
|
||||
'User',
|
||||
'admin'
|
||||
ON CONFLICT (email) DO NOTHING;
|
||||
6
qwen/php/docker/php.ini
Normal file
6
qwen/php/docker/php.ini
Normal file
@@ -0,0 +1,6 @@
|
||||
; Custom PHP configuration
|
||||
memory_limit = 256M
|
||||
upload_max_filesize = 64M
|
||||
post_max_size = 64M
|
||||
max_execution_time = 300
|
||||
max_input_vars = 3000
|
||||
Reference in New Issue
Block a user