gg
This commit is contained in:
parent
27c3f1662d
commit
0e9d6c681f
8
.dockerignore
Normal file
8
.dockerignore
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
README
|
||||||
|
docker-compose.yml
|
||||||
|
Dockerfile
|
||||||
|
.dockerignore
|
||||||
|
uploads/*
|
||||||
|
!uploads/.gitkeep
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
config.php
|
21
Dockerfile
Normal file
21
Dockerfile
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
FROM php:8.1-apache
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
libpng-dev \
|
||||||
|
libjpeg-dev \
|
||||||
|
libfreetype6-dev \
|
||||||
|
libwebp-dev \
|
||||||
|
&& docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \
|
||||||
|
&& docker-php-ext-install -j$(nproc) gd pdo pdo_mysql
|
||||||
|
|
||||||
|
RUN a2enmod rewrite
|
||||||
|
|
||||||
|
COPY . /var/www/html/
|
||||||
|
COPY apache.conf /etc/apache2/sites-available/000-default.conf
|
||||||
|
|
||||||
|
RUN chown -R www-data:www-data /var/www/html \
|
||||||
|
&& chmod -R 755 /var/www/html/uploads
|
||||||
|
|
||||||
|
EXPOSE 65511
|
||||||
|
|
||||||
|
CMD ["apache2-foreground"]
|
16
apache.conf
Normal file
16
apache.conf
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<VirtualHost *:65511>
|
||||||
|
DocumentRoot /var/www/html
|
||||||
|
ServerName localhost
|
||||||
|
|
||||||
|
<Directory /var/www/html>
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
<Directory /var/www/html/uploads>
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||||
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||||
|
</VirtualHost>
|
@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
return [
|
return [
|
||||||
'db' => [
|
'db' => [
|
||||||
'host' => 'localhost',
|
'host' => $_ENV['DB_HOST'] ?? 'mysql',
|
||||||
'name' => 'mkach',
|
'name' => $_ENV['DB_NAME'] ?? 'mkach',
|
||||||
'user' => 'mkach',
|
'user' => $_ENV['DB_USER'] ?? 'mkach',
|
||||||
'pass' => 'your_password'
|
'pass' => $_ENV['DB_PASS'] ?? 'mkach'
|
||||||
],
|
],
|
||||||
'access_key' => 'mkalwaysthebest1337',
|
'access_key' => 'mkalwaysthebest1337',
|
||||||
'upload_path' => 'uploads/',
|
'upload_path' => 'uploads/',
|
||||||
|
34
docker-compose.yml
Normal file
34
docker-compose.yml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
mysql:
|
||||||
|
image: mysql:8.0
|
||||||
|
environment:
|
||||||
|
MYSQL_ROOT_PASSWORD: root
|
||||||
|
MYSQL_DATABASE: mkach
|
||||||
|
MYSQL_USER: mkach
|
||||||
|
MYSQL_PASSWORD: mkach
|
||||||
|
ports:
|
||||||
|
- "3306:3306"
|
||||||
|
volumes:
|
||||||
|
- mysql_data:/var/lib/mysql
|
||||||
|
- ./sql/create.sql:/docker-entrypoint-initdb.d/create.sql
|
||||||
|
|
||||||
|
mkach:
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- "65511:65511"
|
||||||
|
depends_on:
|
||||||
|
- mysql
|
||||||
|
environment:
|
||||||
|
- APACHE_RUN_USER=www-data
|
||||||
|
- APACHE_RUN_GROUP=www-data
|
||||||
|
- DB_HOST=mysql
|
||||||
|
- DB_NAME=mkach
|
||||||
|
- DB_USER=mkach
|
||||||
|
- DB_PASS=mkach
|
||||||
|
volumes:
|
||||||
|
- ./uploads:/var/www/html/uploads
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
mysql_data:
|
1
uploads/.gitkeep
Normal file
1
uploads/.gitkeep
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
Loading…
x
Reference in New Issue
Block a user