init
This commit is contained in:
11
.env.example
Normal file
11
.env.example
Normal file
@@ -0,0 +1,11 @@
|
||||
# Database Configuration
|
||||
DB_HOST=db
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=immorechner
|
||||
DB_USERNAME=immorechner_user
|
||||
DB_PASSWORD=immorechner_pass
|
||||
DB_ROOT_PASSWORD=root
|
||||
|
||||
# Application Configuration
|
||||
APP_ENV=local
|
||||
APP_DEBUG=true
|
||||
71
.gitignore
vendored
Normal file
71
.gitignore
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
# IntelliJ IDEA / PhpStorm
|
||||
.idea/
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea_modules/
|
||||
out/
|
||||
|
||||
# Composer
|
||||
/vendor/
|
||||
composer.lock
|
||||
composer.phar
|
||||
|
||||
# PHP
|
||||
*.log
|
||||
*.cache
|
||||
.phpunit.result.cache
|
||||
php_errors.log
|
||||
|
||||
# Environment files
|
||||
.env
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# OS files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
desktop.ini
|
||||
|
||||
# Temporary files
|
||||
*.tmp
|
||||
*.temp
|
||||
*.swp
|
||||
*.swo
|
||||
*~
|
||||
|
||||
# Build artifacts
|
||||
/build/
|
||||
/dist/
|
||||
|
||||
# Cache directories
|
||||
/cache/
|
||||
/tmp/
|
||||
/temp/
|
||||
|
||||
# Backup files
|
||||
*.bak
|
||||
*.backup
|
||||
*.old
|
||||
|
||||
# Node modules (falls Frontend-Tools verwendet werden)
|
||||
node_modules/
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
|
||||
# PHPUnit
|
||||
/phpunit.xml
|
||||
/.phpunit.cache
|
||||
|
||||
# Coverage reports
|
||||
/coverage/
|
||||
*.coverage
|
||||
clover.xml
|
||||
|
||||
# Deployment files
|
||||
/deploy/
|
||||
*.deploy
|
||||
|
||||
# Docker
|
||||
docker-compose.override.yml
|
||||
.dockerignore
|
||||
40
Dockerfile
Normal file
40
Dockerfile
Normal file
@@ -0,0 +1,40 @@
|
||||
FROM php:8.3-apache
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
git \
|
||||
curl \
|
||||
libpng-dev \
|
||||
libonig-dev \
|
||||
libxml2-dev \
|
||||
zip \
|
||||
unzip \
|
||||
libzip-dev \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install PHP extensions
|
||||
RUN docker-php-ext-install pdo_mysql mysqli mbstring exif pcntl bcmath gd zip
|
||||
|
||||
# Enable Apache mod_rewrite
|
||||
RUN a2enmod rewrite
|
||||
|
||||
# Enable Apache headers module
|
||||
RUN a2enmod headers
|
||||
|
||||
# Copy custom Apache configuration
|
||||
COPY ./docker/apache/000-default.conf /etc/apache2/sites-available/000-default.conf
|
||||
|
||||
# Install Composer
|
||||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /var/www/html
|
||||
|
||||
# Change ownership
|
||||
RUN chown -R www-data:www-data /var/www/html
|
||||
|
||||
# Expose port 80
|
||||
EXPOSE 80
|
||||
|
||||
# Start Apache
|
||||
CMD ["apache2-foreground"]
|
||||
57
docker-compose.yml
Normal file
57
docker-compose.yml
Normal file
@@ -0,0 +1,57 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
web:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: immorechner_web
|
||||
ports:
|
||||
- "8080:80"
|
||||
volumes:
|
||||
- .:/var/www/html
|
||||
environment:
|
||||
- APACHE_DOCUMENT_ROOT=/var/www/html
|
||||
depends_on:
|
||||
- db
|
||||
networks:
|
||||
- immorechner_network
|
||||
|
||||
db:
|
||||
image: mariadb:latest
|
||||
container_name: immorechner_db
|
||||
restart: always
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: immorechner
|
||||
MYSQL_USER: immorechner_user
|
||||
MYSQL_PASSWORD: immorechner_pass
|
||||
ports:
|
||||
- "3306:3306"
|
||||
volumes:
|
||||
- db_data:/var/lib/mysql
|
||||
networks:
|
||||
- immorechner_network
|
||||
|
||||
phpmyadmin:
|
||||
image: phpmyadmin:latest
|
||||
container_name: immorechner_phpmyadmin
|
||||
restart: always
|
||||
ports:
|
||||
- "8081:80"
|
||||
environment:
|
||||
PMA_HOST: db
|
||||
PMA_PORT: 3306
|
||||
PMA_USER: root
|
||||
PMA_PASSWORD: root
|
||||
depends_on:
|
||||
- db
|
||||
networks:
|
||||
- immorechner_network
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
|
||||
networks:
|
||||
immorechner_network:
|
||||
driver: bridge
|
||||
22
docker/apache/000-default.conf
Normal file
22
docker/apache/000-default.conf
Normal file
@@ -0,0 +1,22 @@
|
||||
<VirtualHost *:80>
|
||||
ServerAdmin webmaster@localhost
|
||||
DocumentRoot /var/www/html
|
||||
|
||||
<Directory /var/www/html>
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
# Enable mod_rewrite
|
||||
RewriteEngine On
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||
|
||||
# Optional: Disable directory listing
|
||||
<Directory /var/www/html>
|
||||
Options -Indexes +FollowSymLinks
|
||||
</Directory>
|
||||
|
||||
</VirtualHost>
|
||||
Reference in New Issue
Block a user