mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 03:11:06 +03:30
Merge branch 'temp'
This commit is contained in:
@@ -0,0 +1,42 @@
|
|||||||
|
# Use the official PHP image as the base image
|
||||||
|
FROM 'docker-proxy.meshkee.com/php:8.2-fpm'
|
||||||
|
|
||||||
|
# Set working directory inside the container
|
||||||
|
WORKDIR /var/www/html
|
||||||
|
|
||||||
|
# Install system dependencies
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
git \
|
||||||
|
curl \
|
||||||
|
libpng-dev \
|
||||||
|
libonig-dev \
|
||||||
|
libxml2-dev \
|
||||||
|
zip \
|
||||||
|
unzip \
|
||||||
|
libzip-dev \
|
||||||
|
libpq-dev \
|
||||||
|
libfreetype6-dev \
|
||||||
|
libjpeg62-turbo-dev \
|
||||||
|
libmcrypt-dev \
|
||||||
|
libssl-dev \
|
||||||
|
libicu-dev \
|
||||||
|
g++ \
|
||||||
|
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||||
|
&& docker-php-ext-install -j$(nproc) gd \
|
||||||
|
&& docker-php-ext-install pdo_mysql pdo_pgsql mbstring exif pcntl bcmath opcache intl zip
|
||||||
|
|
||||||
|
# Install Composer
|
||||||
|
COPY --from=docker-proxy.meshkee.com/composer:2 /usr/bin/composer /usr/bin/composer
|
||||||
|
|
||||||
|
# Copy application code into the container
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Install PHP dependencies
|
||||||
|
RUN composer install --no-interaction --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
|
# Set permissions for the Laravel project
|
||||||
|
RUN chown -R www-data:www-data /var/www/html \
|
||||||
|
&& chmod -R 777 /var/www/html/storage /var/www/html/bootstrap/cache
|
||||||
|
|
||||||
|
# Expose port 9000 for PHP-FPM
|
||||||
|
EXPOSE 9000
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
index index.php index.html;
|
||||||
|
server_name localhost;
|
||||||
|
root /var/www/html/public;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.php?$query_string;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ \.php$ {
|
||||||
|
fastcgi_pass app:9000;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
include fastcgi_params;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ /\.ht {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
services:
|
||||||
|
app:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile.dev
|
||||||
|
image: cssd_app
|
||||||
|
container_name: cssd_app
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
volumes:
|
||||||
|
- .:/var/www/html
|
||||||
|
depends_on:
|
||||||
|
- mysql
|
||||||
|
- redis
|
||||||
|
networks:
|
||||||
|
- cssd-network
|
||||||
|
|
||||||
|
nginx:
|
||||||
|
image: nginx:alpine
|
||||||
|
ports:
|
||||||
|
- "8089:80"
|
||||||
|
volumes:
|
||||||
|
- .:/var/www/html
|
||||||
|
- ./developement/nginx.conf:/etc/nginx/conf.d/default.conf
|
||||||
|
depends_on:
|
||||||
|
- app
|
||||||
|
- mysql
|
||||||
|
networks:
|
||||||
|
- cssd-network
|
||||||
|
|
||||||
|
mysql:
|
||||||
|
image: 'docker-proxy.meshkee.com/mysql/mysql-server:8.0'
|
||||||
|
container_name: cssd_mysql
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "3312:3306"
|
||||||
|
environment:
|
||||||
|
MYSQL_DATABASE: "${DB_DATABASE:-cssd}"
|
||||||
|
MYSQL_PORT: "${DB_PORT:-3306}"
|
||||||
|
MYSQL_USERNAME: "${DB_USERNAME:-root}"
|
||||||
|
MYSQL_PASSWORD: "${DB_PASSWORD:-secret}"
|
||||||
|
MYSQL_ROOT_PASSWORD: "${DB_PASSWORD:-secret}"
|
||||||
|
volumes:
|
||||||
|
- db_volume:/var/lib/mysql
|
||||||
|
networks:
|
||||||
|
- cssd-network
|
||||||
|
redis:
|
||||||
|
image: 'docker-proxy.meshkee.com/redis:alpine'
|
||||||
|
container_name: cssd_redis
|
||||||
|
ports:
|
||||||
|
- "6385:6379"
|
||||||
|
networks:
|
||||||
|
- cssd-network
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
db_volume:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
cssd-network:
|
||||||
|
driver: bridge
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user