Compare commits
4 Commits
a2857e18fb
...
0048ea12be
| Author | SHA1 | Date | |
|---|---|---|---|
| 0048ea12be | |||
| d67a683cd5 | |||
| 7368dd24e6 | |||
| 1d22b41fba |
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1 @@
|
||||
/nbproject/private/
|
||||
/cache/
|
||||
config.php
|
||||
2
cache/.gitignore
vendored
Normal file
2
cache/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
0
cache/.gitkeep
vendored
0
cache/.gitkeep
vendored
19
config.php.dist
Normal file
19
config.php.dist
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
namespace WEBCRAFT;
|
||||
function config($basepath){
|
||||
return array( array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_ERRORREPORTING, E_ALL | E_STRICT),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL, 'http://localhost/'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH, $basepath.'/'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_TYPE, \SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_TYPE_MYS),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_HOST, 'mariadb'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PORT, ''),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_USER, 'web'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PASSWORD, 'SECRET'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_DBNAME, 'system'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_PROJECT, 'yeminy'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL, 'lib/system/'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_LANGS, array('deDE','enUS')),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_LANG, 'deDE'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_CACHE, $basepath.'/cache/'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CRON_LOG2SQLITE_PATH, $basepath.'/log/'));
|
||||
}
|
||||
39
docker-compose.yml
Normal file
39
docker-compose.yml
Normal file
@ -0,0 +1,39 @@
|
||||
version: "3.4"
|
||||
|
||||
services:
|
||||
mariadb:
|
||||
build:
|
||||
context: ./docker
|
||||
dockerfile: ./Dockerfile.mariadb
|
||||
environment:
|
||||
#- MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1
|
||||
- MARIADB_ROOT_PASSWORD=SECRET
|
||||
- MARIADB_USER=web
|
||||
ports:
|
||||
- 3306:3306
|
||||
volumes:
|
||||
- db_vol:/var/lib/mysql
|
||||
|
||||
php:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./docker/Dockerfile.php
|
||||
volumes:
|
||||
- ./:/app
|
||||
user: "1000"
|
||||
|
||||
nginx:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./docker/Dockerfile.nginx
|
||||
depends_on:
|
||||
- php
|
||||
- mariadb
|
||||
ports:
|
||||
- 80:80
|
||||
volumes:
|
||||
- ./nginx/log:/var/log/nginx
|
||||
- ./:/app
|
||||
|
||||
volumes:
|
||||
db_vol:
|
||||
1
docker/Dockerfile.mariadb
Normal file
1
docker/Dockerfile.mariadb
Normal file
@ -0,0 +1 @@
|
||||
FROM mariadb:latest
|
||||
3
docker/Dockerfile.nginx
Normal file
3
docker/Dockerfile.nginx
Normal file
@ -0,0 +1,3 @@
|
||||
FROM nginx:latest
|
||||
|
||||
COPY ../nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||
5
docker/Dockerfile.php
Normal file
5
docker/Dockerfile.php
Normal file
@ -0,0 +1,5 @@
|
||||
FROM php:8.2-fpm-alpine
|
||||
|
||||
# RUN docker-php-ext-install pdo pdo_mysql mbstring
|
||||
# RUN apk add sqlite
|
||||
RUN docker-php-ext-install session mysqli
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
require_once 'lib/autoload.inc'; // SYSTEM Classes
|
||||
require_once 'yeminy/autoload.inc'; // Project Classes
|
||||
require_once '../../config/get_config.php'; // Config
|
||||
require_once 'config.php'; // Config
|
||||
|
||||
\SYSTEM\system::start(\WEBCRAFT\get_config(dirname(__FILE__)));
|
||||
\SYSTEM\system::start(\WEBCRAFT\config(dirname(__FILE__)));
|
||||
@ -1 +1 @@
|
||||
Subproject commit 995104aaaf19be91f59031307844b6a3c7ceea06
|
||||
Subproject commit 2b960dd5bab1259a8154e577eb79e42b2b2ff0dd
|
||||
@ -1,8 +0,0 @@
|
||||
auxiliary.org-netbeans-modules-php-smarty.smarty-framework=true
|
||||
include.path=${php.global.include.path}
|
||||
php.version=PHP_56
|
||||
source.encoding=UTF-8
|
||||
src.dir=.
|
||||
tags.asp=false
|
||||
tags.short=false
|
||||
web.root=.
|
||||
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>org.netbeans.modules.php.project</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/php-project/1">
|
||||
<name>yeminy</name>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
||||
26
nginx/default.conf
Normal file
26
nginx/default.conf
Normal file
@ -0,0 +1,26 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
root /app;
|
||||
index index.php;
|
||||
|
||||
rewrite ^(.*)/webfonts/(.*)$ /lib/system/lib/font_awesome/lib/webfonts/$2;
|
||||
rewrite ^sai$ /sai.php$1;
|
||||
rewrite ^(.*)/files/([^/]+)/([^/]+)$ /api.php?call=files&cat=$2&id=$3;
|
||||
rewrite ^/cache/([^/]+)/([^/]+)$ /api.php?call=cache&id=$1&ident=$2;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass php:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
}
|
||||
}
|
||||
}
|
||||
2
nginx/log/.gitignore
vendored
Normal file
2
nginx/log/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
Loading…
x
Reference in New Issue
Block a user