@wocker/ws 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/decorators/Inject.d.ts +1 -0
- package/lib/decorators/Inject.js +8 -0
- package/lib/decorators/Injectable.d.ts +4 -0
- package/lib/decorators/Injectable.js +17 -0
- package/lib/decorators/index.d.ts +1 -0
- package/lib/decorators/index.js +17 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/makes/FS.d.ts +3 -9
- package/lib/makes/FS.js +2 -54
- package/lib/utils/exec.js +4 -4
- package/package.json +3 -4
- package/presets/node/config.json +2 -1
- package/presets/php-apache/Dockerfile +9 -3
- package/presets/php-apache/config.json +3 -1
- package/presets/apache/.docker/apache2/apache2.conf +0 -230
- package/presets/apache/.docker/apache2/mods-available/mpm_prefork.conf +0 -16
- package/presets/apache/.docker/apache2/sites-available/000-default.conf.conf +0 -21
- package/presets/apache/Dockerfile +0 -110
- package/presets/apache/bin/compare-version +0 -3
- package/presets/apache/config.json +0 -47
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Inject: () => (target: any) => void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Injectable = void 0;
|
|
4
|
+
const Injectable = () => {
|
|
5
|
+
return (Target) => {
|
|
6
|
+
return class extends Target {
|
|
7
|
+
constructor(di) {
|
|
8
|
+
const types = Reflect.getMetadata("design:paramtypes", Target);
|
|
9
|
+
const params = types.map((type) => {
|
|
10
|
+
return (di).resolveService(type);
|
|
11
|
+
});
|
|
12
|
+
super(...params);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
exports.Injectable = Injectable;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Injectable";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Injectable"), exports);
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -28,5 +28,6 @@ app.use(plugins_1.PageKitePlugin);
|
|
|
28
28
|
app.use(plugins_1.PostgresPlugin);
|
|
29
29
|
app.use(plugins_1.ProxmoxPlugin);
|
|
30
30
|
app.use(plugins_1.RedisPlugin);
|
|
31
|
+
__exportStar(require("./decorators"), exports);
|
|
31
32
|
__exportStar(require("./makes"), exports);
|
|
32
33
|
__exportStar(require("./services"), exports);
|
package/lib/makes/FS.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
|
-
|
|
3
|
+
import { FS as CoreFS } from "@wocker/core";
|
|
4
4
|
import * as fs from "fs";
|
|
5
|
-
import { Stats, BigIntStats, PathLike, PathOrFileDescriptor, WriteFileOptions, MakeDirectoryOptions
|
|
5
|
+
import { Stats, BigIntStats, PathLike, PathOrFileDescriptor, WriteFileOptions, MakeDirectoryOptions } from "fs";
|
|
6
6
|
import { PassThrough } from "readable-stream";
|
|
7
7
|
type ReaddirFilesOptions = {
|
|
8
8
|
recursive?: boolean;
|
|
9
9
|
};
|
|
10
|
-
declare class FS {
|
|
10
|
+
declare class FS extends CoreFS {
|
|
11
11
|
static access(path: PathLike): Promise<any>;
|
|
12
12
|
static exists(path: PathLike): Promise<boolean>;
|
|
13
13
|
static existsSync(path: PathLike): boolean;
|
|
@@ -17,21 +17,15 @@ declare class FS {
|
|
|
17
17
|
static readdirFiles(path: string, options?: ReaddirFilesOptions): Promise<string[]>;
|
|
18
18
|
static appendFile(path: PathOrFileDescriptor, data: any, options?: WriteFileOptions): Promise<unknown>;
|
|
19
19
|
static appendFileSync(path: PathOrFileDescriptor, data: any, options?: WriteFileOptions): void;
|
|
20
|
-
static read(): void;
|
|
21
20
|
static readBytes(filePath: PathLike, position?: number | bigint, size?: number | bigint): Promise<Buffer>;
|
|
22
|
-
static readFile(filePath: PathLike | number): Promise<Buffer>;
|
|
23
21
|
static readFileSync(filePath: PathLike): Buffer;
|
|
24
|
-
static writeFile(filePath: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): Promise<void>;
|
|
25
22
|
static writeFileSync(path: PathLike, data: any, options?: WriteFileOptions): void;
|
|
26
23
|
static createWriteStream(path: PathLike): fs.WriteStream;
|
|
27
|
-
static readJSON(...paths: string[]): Promise<any>;
|
|
28
|
-
static writeJSON(filePath: PathLike | number, data: any): Promise<void>;
|
|
29
24
|
static unlink(filePath: PathLike): Promise<void>;
|
|
30
25
|
static watch(filename: PathLike, options?: any): fs.FSWatcher;
|
|
31
26
|
static stat(filename: PathLike, options?: Parameters<typeof fs.stat>[1]): Promise<Stats | BigIntStats>;
|
|
32
27
|
static createReadStream(path: PathLike, options?: Parameters<typeof fs.createReadStream>[1]): fs.ReadStream;
|
|
33
28
|
static createReadLinesStream(path: PathLike, count?: number): PassThrough;
|
|
34
29
|
static copyFile(src: PathLike, dest: PathLike): Promise<void>;
|
|
35
|
-
static rm(path: PathLike, options?: RmOptions): Promise<unknown>;
|
|
36
30
|
}
|
|
37
31
|
export { FS };
|
package/lib/makes/FS.js
CHANGED
|
@@ -24,10 +24,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.FS = void 0;
|
|
27
|
+
const core_1 = require("@wocker/core");
|
|
27
28
|
const fs = __importStar(require("fs"));
|
|
28
29
|
const Path = __importStar(require("path"));
|
|
29
30
|
const readable_stream_1 = require("readable-stream");
|
|
30
|
-
class FS {
|
|
31
|
+
class FS extends core_1.FS {
|
|
31
32
|
static async access(path) {
|
|
32
33
|
return new Promise((resolve, reject) => {
|
|
33
34
|
fs.access(path, (err) => {
|
|
@@ -131,8 +132,6 @@ class FS {
|
|
|
131
132
|
static appendFileSync(path, data, options) {
|
|
132
133
|
return fs.appendFileSync(path, data, options);
|
|
133
134
|
}
|
|
134
|
-
static read() {
|
|
135
|
-
}
|
|
136
135
|
static async readBytes(filePath, position = 0, size) {
|
|
137
136
|
if (position < 0 && typeof size === "undefined") {
|
|
138
137
|
const stats = await FS.stat(filePath);
|
|
@@ -171,56 +170,15 @@ class FS {
|
|
|
171
170
|
});
|
|
172
171
|
});
|
|
173
172
|
}
|
|
174
|
-
static async readFile(filePath) {
|
|
175
|
-
return new Promise((resolve, reject) => {
|
|
176
|
-
fs.readFile(filePath, (err, data) => {
|
|
177
|
-
if (!err) {
|
|
178
|
-
resolve(data);
|
|
179
|
-
}
|
|
180
|
-
else {
|
|
181
|
-
reject(err);
|
|
182
|
-
}
|
|
183
|
-
});
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
173
|
static readFileSync(filePath) {
|
|
187
174
|
return fs.readFileSync(filePath);
|
|
188
175
|
}
|
|
189
|
-
static async writeFile(filePath, data, options) {
|
|
190
|
-
return new Promise((resolve, reject) => {
|
|
191
|
-
fs.writeFile(filePath, data, options, (err) => {
|
|
192
|
-
if (!err) {
|
|
193
|
-
resolve();
|
|
194
|
-
}
|
|
195
|
-
else {
|
|
196
|
-
reject(err);
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
176
|
static writeFileSync(path, data, options) {
|
|
202
177
|
return fs.writeFileSync(path, data, options);
|
|
203
178
|
}
|
|
204
179
|
static createWriteStream(path) {
|
|
205
180
|
return fs.createWriteStream(path);
|
|
206
181
|
}
|
|
207
|
-
static async readJSON(...paths) {
|
|
208
|
-
const res = await new Promise((resolve, reject) => {
|
|
209
|
-
const filePath = Path.join(...paths);
|
|
210
|
-
fs.readFile(filePath, (err, data) => {
|
|
211
|
-
if (err) {
|
|
212
|
-
reject(err);
|
|
213
|
-
return;
|
|
214
|
-
}
|
|
215
|
-
resolve(data);
|
|
216
|
-
});
|
|
217
|
-
});
|
|
218
|
-
return JSON.parse(res.toString());
|
|
219
|
-
}
|
|
220
|
-
static async writeJSON(filePath, data) {
|
|
221
|
-
const json = JSON.stringify(data, null, 4);
|
|
222
|
-
return FS.writeFile(filePath, json);
|
|
223
|
-
}
|
|
224
182
|
static async unlink(filePath) {
|
|
225
183
|
return new Promise((resolve, reject) => {
|
|
226
184
|
fs.unlink(filePath, (err) => {
|
|
@@ -330,15 +288,5 @@ class FS {
|
|
|
330
288
|
});
|
|
331
289
|
});
|
|
332
290
|
}
|
|
333
|
-
static async rm(path, options) {
|
|
334
|
-
return new Promise((resolve, reject) => {
|
|
335
|
-
fs.rm(path, options, (err) => {
|
|
336
|
-
if (err) {
|
|
337
|
-
return reject(err);
|
|
338
|
-
}
|
|
339
|
-
return resolve(undefined);
|
|
340
|
-
});
|
|
341
|
-
});
|
|
342
|
-
}
|
|
343
291
|
}
|
|
344
292
|
exports.FS = FS;
|
package/lib/utils/exec.js
CHANGED
|
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.exec = void 0;
|
|
7
|
-
const core_1 = require("@wocker/core");
|
|
8
7
|
const child_process_1 = require("child_process");
|
|
9
8
|
const chalk_1 = __importDefault(require("chalk"));
|
|
9
|
+
const makes_1 = require("../makes");
|
|
10
10
|
const exec = async (command) => {
|
|
11
|
-
|
|
11
|
+
makes_1.Logger.info(` > ${command.trim().replace(/\s+/g, " ")}`);
|
|
12
12
|
return new Promise((resolve, reject) => {
|
|
13
13
|
const worker = (0, child_process_1.exec)(command, {
|
|
14
14
|
maxBuffer: Infinity
|
|
@@ -32,10 +32,10 @@ const exec = async (command) => {
|
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
worker.on("close", (code) => {
|
|
35
|
-
|
|
35
|
+
makes_1.Logger.info("close", chalk_1.default.red(code));
|
|
36
36
|
});
|
|
37
37
|
worker.on("exit", (code) => {
|
|
38
|
-
|
|
38
|
+
makes_1.Logger.info("exit", chalk_1.default.red(code));
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
41
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wocker/ws",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"author": "Kris Papercut <krispcut@gmail.com>",
|
|
5
5
|
"description": "Docker workspace for web projects",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@wocker/core": "^1.0.4",
|
|
30
30
|
"@wocker/utils": "^1.0.2",
|
|
31
31
|
"async-mutex": "^0.4.0",
|
|
32
|
-
"axios": "^1.
|
|
32
|
+
"axios": "^1.6.7",
|
|
33
33
|
"chalk": "^2.4.2",
|
|
34
34
|
"child_process": "^1.0.2",
|
|
35
35
|
"cli-table3": "^0.6.2",
|
|
@@ -41,8 +41,7 @@
|
|
|
41
41
|
"os": "^0.1.2",
|
|
42
42
|
"path": "^0.12.7",
|
|
43
43
|
"readable-stream": "^4.1.0",
|
|
44
|
-
"reflect-metadata": "^0.2.1"
|
|
45
|
-
"tty": "^1.0.1"
|
|
44
|
+
"reflect-metadata": "^0.2.1"
|
|
46
45
|
},
|
|
47
46
|
"devDependencies": {
|
|
48
47
|
"@types/dockerode": "^3.3.23",
|
package/presets/node/config.json
CHANGED
|
@@ -5,8 +5,7 @@ FROM php:${PHP_VERSION}-apache
|
|
|
5
5
|
ARG UID=1000
|
|
6
6
|
ARG USER=www-data
|
|
7
7
|
|
|
8
|
-
RUN usermod -u
|
|
9
|
-
# useradd -G root,www-data -u $UID -d /home/$USER $USER && \
|
|
8
|
+
RUN usermod -u $UID www-data && \
|
|
10
9
|
mkdir -p /home/$USER && \
|
|
11
10
|
touch /home/$USER/.bashrc && \
|
|
12
11
|
chown -R $USER:$USER /home/$USER
|
|
@@ -16,7 +15,6 @@ ADD ./bin/compare-version /usr/local/bin/compare-version
|
|
|
16
15
|
RUN chmod +x /usr/local/bin/compare-version
|
|
17
16
|
|
|
18
17
|
RUN apt-get update --fix-missing -y
|
|
19
|
-
#RUN apt-get upgrade
|
|
20
18
|
RUN apt-get install -y curl git
|
|
21
19
|
|
|
22
20
|
#RUN apt-get install -y \
|
|
@@ -39,6 +37,14 @@ RUN if [ "$PDO_MYSQL_ENABLE" = "true" ]; then \
|
|
|
39
37
|
docker-php-ext-enable pdo_mysql; \
|
|
40
38
|
fi
|
|
41
39
|
|
|
40
|
+
# pgsql
|
|
41
|
+
ARG PGSQL_ENABLE=false
|
|
42
|
+
RUN if [ "$PGSQL_ENABLE" = "true" ]; then \
|
|
43
|
+
apt-get install -y libpq-dev && \
|
|
44
|
+
docker-php-ext-install -j "$(nproc)" pgsql pdo_pgsql && \
|
|
45
|
+
docker-php-ext-enable pgsql pdo_pgsql; \
|
|
46
|
+
fi
|
|
47
|
+
|
|
42
48
|
#gd
|
|
43
49
|
ARG GD_ENABLE=false
|
|
44
50
|
RUN if [ "$GD_ENABLE" = "true" ]; then \
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"options": {
|
|
21
21
|
"MYSQLI_ENABLE": "Mysqli",
|
|
22
22
|
"PDO_MYSQL_ENABLE": "PDO",
|
|
23
|
+
"PGSQL_ENABLE": "Pgsql",
|
|
23
24
|
"GD_ENABLE": "GD",
|
|
24
25
|
"ZIP_ENABLE": "Zip"
|
|
25
26
|
}
|
|
@@ -34,7 +35,8 @@
|
|
|
34
35
|
"options": [
|
|
35
36
|
"none",
|
|
36
37
|
"v17.9.1",
|
|
37
|
-
"v18.16.0"
|
|
38
|
+
"v18.16.0",
|
|
39
|
+
"v20.11.0"
|
|
38
40
|
]
|
|
39
41
|
}
|
|
40
42
|
},
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
# This is the main Apache server configuration file. It contains the
|
|
2
|
-
# configuration directives that give the server its instructions.
|
|
3
|
-
# See http://httpd.apache.org/docs/2.4/ for detailed information about
|
|
4
|
-
# the directives and /usr/share/doc/apache2/README.Debian about Debian specific
|
|
5
|
-
# hints.
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
# Summary of how the Apache 2 configuration works in Debian:
|
|
9
|
-
# The Apache 2 web server configuration in Debian is quite different to
|
|
10
|
-
# upstream's suggested way to configure the web server. This is because Debian's
|
|
11
|
-
# default Apache2 installation attempts to make adding and removing modules,
|
|
12
|
-
# virtual hosts, and extra configuration directives as flexible as possible, in
|
|
13
|
-
# order to make automating the changes and administering the server as easy as
|
|
14
|
-
# possible.
|
|
15
|
-
|
|
16
|
-
# It is split into several files forming the configuration hierarchy outlined
|
|
17
|
-
# below, all located in the /etc/apache2/ directory:
|
|
18
|
-
#
|
|
19
|
-
# /etc/apache2/
|
|
20
|
-
# |-- apache2.conf
|
|
21
|
-
# | `-- ports.conf
|
|
22
|
-
# |-- mods-enabled
|
|
23
|
-
# | |-- *.load
|
|
24
|
-
# | `-- *.conf
|
|
25
|
-
# |-- conf-enabled
|
|
26
|
-
# | `-- *.conf
|
|
27
|
-
# `-- sites-enabled
|
|
28
|
-
# `-- *.conf
|
|
29
|
-
#
|
|
30
|
-
#
|
|
31
|
-
# * apache2.conf is the main configuration file (this file). It puts the pieces
|
|
32
|
-
# together by including all remaining configuration files when starting up the
|
|
33
|
-
# web server.
|
|
34
|
-
#
|
|
35
|
-
# * ports.conf is always included from the main configuration file. It is
|
|
36
|
-
# supposed to determine listening ports for incoming connections which can be
|
|
37
|
-
# customized anytime.
|
|
38
|
-
#
|
|
39
|
-
# * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
|
|
40
|
-
# directories contain particular configuration snippets which manage modules,
|
|
41
|
-
# global configuration fragments, or virtual host configurations,
|
|
42
|
-
# respectively.
|
|
43
|
-
#
|
|
44
|
-
# They are activated by symlinking available configuration files from their
|
|
45
|
-
# respective *-available/ counterparts. These should be managed by using our
|
|
46
|
-
# helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See
|
|
47
|
-
# their respective man pages for detailed information.
|
|
48
|
-
#
|
|
49
|
-
# * The binary is called apache2. Due to the use of environment variables, in
|
|
50
|
-
# the default configuration, apache2 needs to be started/stopped with
|
|
51
|
-
# /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
|
|
52
|
-
# work with the default configuration.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
# Global configuration
|
|
56
|
-
#
|
|
57
|
-
|
|
58
|
-
#
|
|
59
|
-
# ServerRoot: The top of the directory tree under which the server's
|
|
60
|
-
# configuration, error, and log files are kept.
|
|
61
|
-
#
|
|
62
|
-
# NOTE! If you intend to place this on an NFS (or otherwise network)
|
|
63
|
-
# mounted filesystem then please read the Mutex documentation (available
|
|
64
|
-
# at <URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex>);
|
|
65
|
-
# you will save yourself a lot of trouble.
|
|
66
|
-
#
|
|
67
|
-
# Do NOT add a slash at the end of the directory path.
|
|
68
|
-
#
|
|
69
|
-
#ServerRoot "/etc/apache2"
|
|
70
|
-
|
|
71
|
-
#
|
|
72
|
-
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
|
|
73
|
-
#
|
|
74
|
-
#Mutex file:${APACHE_LOCK_DIR} default
|
|
75
|
-
|
|
76
|
-
#
|
|
77
|
-
# The directory where shm and other runtime files will be stored.
|
|
78
|
-
#
|
|
79
|
-
|
|
80
|
-
DefaultRuntimeDir ${APACHE_RUN_DIR}
|
|
81
|
-
|
|
82
|
-
#
|
|
83
|
-
# PidFile: The file in which the server should record its process
|
|
84
|
-
# identification number when it starts.
|
|
85
|
-
# This needs to be set in /etc/apache2/envvars
|
|
86
|
-
#
|
|
87
|
-
PidFile ${APACHE_PID_FILE}
|
|
88
|
-
|
|
89
|
-
#
|
|
90
|
-
# Timeout: The number of seconds before receives and sends time out.
|
|
91
|
-
#
|
|
92
|
-
Timeout 300
|
|
93
|
-
|
|
94
|
-
#
|
|
95
|
-
# KeepAlive: Whether or not to allow persistent connections (more than
|
|
96
|
-
# one request per connection). Set to "Off" to deactivate.
|
|
97
|
-
#
|
|
98
|
-
KeepAlive On
|
|
99
|
-
|
|
100
|
-
#
|
|
101
|
-
# MaxKeepAliveRequests: The maximum number of requests to allow
|
|
102
|
-
# during a persistent connection. Set to 0 to allow an unlimited amount.
|
|
103
|
-
# We recommend you leave this number high, for maximum performance.
|
|
104
|
-
#
|
|
105
|
-
MaxKeepAliveRequests 100
|
|
106
|
-
|
|
107
|
-
#
|
|
108
|
-
# KeepAliveTimeout: Number of seconds to wait for the next request from the
|
|
109
|
-
# same client on the same connection.
|
|
110
|
-
#
|
|
111
|
-
KeepAliveTimeout 5
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
# These need to be set in /etc/apache2/envvars
|
|
115
|
-
User ${APACHE_RUN_USER}
|
|
116
|
-
Group ${APACHE_RUN_GROUP}
|
|
117
|
-
|
|
118
|
-
#
|
|
119
|
-
# HostnameLookups: Log the names of clients or just their IP addresses
|
|
120
|
-
# e.g., www.apache.org (on) or 204.62.129.132 (off).
|
|
121
|
-
# The default is off because it'd be overall better for the net if people
|
|
122
|
-
# had to knowingly turn this feature on, since enabling it means that
|
|
123
|
-
# each client request will result in AT LEAST one lookup request to the
|
|
124
|
-
# nameserver.
|
|
125
|
-
#
|
|
126
|
-
HostnameLookups Off
|
|
127
|
-
|
|
128
|
-
# ErrorLog: The location of the error log file.
|
|
129
|
-
# If you do not specify an ErrorLog directive within a <VirtualHost>
|
|
130
|
-
# container, error messages relating to that virtual host will be
|
|
131
|
-
# logged here. If you *do* define an error logfile for a <VirtualHost>
|
|
132
|
-
# container, that host's errors will be logged there and not here.
|
|
133
|
-
#
|
|
134
|
-
ErrorLog ${APACHE_LOG_DIR}/error.log
|
|
135
|
-
|
|
136
|
-
#
|
|
137
|
-
# LogLevel: Control the severity of messages logged to the error_log.
|
|
138
|
-
# Available values: trace8, ..., trace1, debug, info, notice, warn,
|
|
139
|
-
# error, crit, alert, emerg.
|
|
140
|
-
# It is also possible to configure the log level for particular modules, e.g.
|
|
141
|
-
# "LogLevel info ssl:warn"
|
|
142
|
-
#
|
|
143
|
-
LogLevel warn
|
|
144
|
-
|
|
145
|
-
# Include module configuration:
|
|
146
|
-
IncludeOptional mods-enabled/*.load
|
|
147
|
-
IncludeOptional mods-enabled/*.conf
|
|
148
|
-
|
|
149
|
-
# Include list of ports to listen on
|
|
150
|
-
Include ports.conf
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
# Sets the default security model of the Apache2 HTTPD server. It does
|
|
154
|
-
# not allow access to the root filesystem outside of /usr/share and /var/www.
|
|
155
|
-
# The former is used by web applications packaged in Debian,
|
|
156
|
-
# the latter may be used for local directories served by the web server. If
|
|
157
|
-
# your system is serving content from a sub-directory in /srv you must allow
|
|
158
|
-
# access here, or in any related virtual host.
|
|
159
|
-
<Directory />
|
|
160
|
-
Options FollowSymLinks
|
|
161
|
-
AllowOverride None
|
|
162
|
-
Require all denied
|
|
163
|
-
</Directory>
|
|
164
|
-
|
|
165
|
-
<Directory /usr/share>
|
|
166
|
-
AllowOverride None
|
|
167
|
-
Require all granted
|
|
168
|
-
</Directory>
|
|
169
|
-
|
|
170
|
-
<Directory /var/www/>
|
|
171
|
-
Options Indexes FollowSymLinks
|
|
172
|
-
AllowOverride None
|
|
173
|
-
Require all granted
|
|
174
|
-
</Directory>
|
|
175
|
-
|
|
176
|
-
#<Directory /srv/>
|
|
177
|
-
# Options Indexes FollowSymLinks
|
|
178
|
-
# AllowOverride None
|
|
179
|
-
# Require all granted
|
|
180
|
-
#</Directory>
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
# AccessFileName: The name of the file to look for in each directory
|
|
186
|
-
# for additional configuration directives. See also the AllowOverride
|
|
187
|
-
# directive.
|
|
188
|
-
#
|
|
189
|
-
AccessFileName .htaccess
|
|
190
|
-
|
|
191
|
-
#
|
|
192
|
-
# The following lines prevent .htaccess and .htpasswd files from being
|
|
193
|
-
# viewed by Web clients.
|
|
194
|
-
#
|
|
195
|
-
<FilesMatch "^\.ht">
|
|
196
|
-
Require all denied
|
|
197
|
-
</FilesMatch>
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
#
|
|
201
|
-
# The following directives define some format nicknames for use with
|
|
202
|
-
# a CustomLog directive.
|
|
203
|
-
#
|
|
204
|
-
# These deviate from the Common Log Format definitions in that they use %O
|
|
205
|
-
# (the actual bytes sent including headers) instead of %b (the size of the
|
|
206
|
-
# requested file), because the latter makes it impossible to detect partial
|
|
207
|
-
# requests.
|
|
208
|
-
#
|
|
209
|
-
# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
|
|
210
|
-
# Use mod_remoteip instead.
|
|
211
|
-
#
|
|
212
|
-
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
|
|
213
|
-
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
|
214
|
-
LogFormat "%h %l %u %t \"%r\" %>s %O" common
|
|
215
|
-
LogFormat "%{Referer}i -> %U" referer
|
|
216
|
-
LogFormat "%{User-agent}i" agent
|
|
217
|
-
|
|
218
|
-
# Include of directories ignores editors' and dpkg's backup files,
|
|
219
|
-
# see README.Debian for details.
|
|
220
|
-
|
|
221
|
-
# Include generic snippets of statements
|
|
222
|
-
IncludeOptional conf-enabled/*.conf
|
|
223
|
-
|
|
224
|
-
# Include the virtual host configurations:
|
|
225
|
-
IncludeOptional sites-enabled/*.conf
|
|
226
|
-
|
|
227
|
-
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
|
|
228
|
-
|
|
229
|
-
ServerTokens Prod
|
|
230
|
-
ServerSignature Off
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# prefork MPM
|
|
2
|
-
# StartServers: number of server processes to start
|
|
3
|
-
# MinSpareServers: minimum number of server processes which are kept spare
|
|
4
|
-
# MaxSpareServers: maximum number of server processes which are kept spare
|
|
5
|
-
# MaxRequestWorkers: maximum number of server processes allowed to start
|
|
6
|
-
# MaxConnectionsPerChild: maximum number of requests a server process serves
|
|
7
|
-
|
|
8
|
-
<IfModule mpm_prefork_module>
|
|
9
|
-
StartServers 5
|
|
10
|
-
MinSpareServers 10
|
|
11
|
-
MaxSpareServers 20
|
|
12
|
-
MaxRequestWorkers 150
|
|
13
|
-
MaxConnectionsPerChild 0
|
|
14
|
-
</IfModule>
|
|
15
|
-
|
|
16
|
-
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<VirtualHost *:80>
|
|
2
|
-
# ServerName preset.workspace
|
|
3
|
-
# ServerAlias preset-front.workspace
|
|
4
|
-
|
|
5
|
-
DocumentRoot /var/www/html
|
|
6
|
-
# SetEnv PHP_ENV live
|
|
7
|
-
|
|
8
|
-
# <Directory /var/www>
|
|
9
|
-
# Options +ExecCGI -Indexes +FollowSymLinks +MultiViews
|
|
10
|
-
# AllowOverride All
|
|
11
|
-
# Require all granted
|
|
12
|
-
# </Directory>
|
|
13
|
-
|
|
14
|
-
# <FilesMatch "\.(env|yml|sh|conf)|Dockerfile">
|
|
15
|
-
# Order allow,deny
|
|
16
|
-
# Deny from all
|
|
17
|
-
# </FilesMatch>
|
|
18
|
-
|
|
19
|
-
ErrorLog /dev/stderr
|
|
20
|
-
CustomLog /dev/stdout combined
|
|
21
|
-
</VirtualHost>
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
ARG PHP_VERSION
|
|
2
|
-
|
|
3
|
-
FROM php:${PHP_VERSION}-apache
|
|
4
|
-
|
|
5
|
-
# WS Tools
|
|
6
|
-
ADD ./bin/compare-version /usr/local/bin/compare-version
|
|
7
|
-
RUN chmod +x /usr/local/bin/compare-version
|
|
8
|
-
|
|
9
|
-
RUN apt-get update --fix-missing -y
|
|
10
|
-
#RUN apt-get upgrade
|
|
11
|
-
RUN apt-get install -y curl
|
|
12
|
-
|
|
13
|
-
#RUN apt-get install -y \
|
|
14
|
-
# build-essential \
|
|
15
|
-
# libssl-dev \
|
|
16
|
-
# zlib1g-dev
|
|
17
|
-
|
|
18
|
-
# Git
|
|
19
|
-
#RUN apt-get install -y git
|
|
20
|
-
|
|
21
|
-
# Mysqli
|
|
22
|
-
ARG MYSQLI_ENABLE=true
|
|
23
|
-
RUN if [ "$MYSQLI_ENABLE" = "true" ]; then \
|
|
24
|
-
docker-php-ext-install -j "$(nproc)" mysqli && \
|
|
25
|
-
docker-php-ext-enable mysqli; \
|
|
26
|
-
fi
|
|
27
|
-
|
|
28
|
-
# pdo
|
|
29
|
-
ARG PDO_MYSQL_ENABLE=true
|
|
30
|
-
RUN if [ "$PDO_ENABLE" = "true" ]; then \
|
|
31
|
-
docker-php-ext-install pdo pdo_mysql && \
|
|
32
|
-
docker-php-ext-enable pdo_mysql; \
|
|
33
|
-
fi
|
|
34
|
-
|
|
35
|
-
#gd
|
|
36
|
-
ARG GD_ENABLE=false
|
|
37
|
-
RUN if [ "$GD_ENABLE" = "true" ]; then \
|
|
38
|
-
apt-get update && apt-get install -y \
|
|
39
|
-
libfreetype6-dev \
|
|
40
|
-
libjpeg62-turbo-dev \
|
|
41
|
-
libpng-dev && \
|
|
42
|
-
compare-version $PHP_VERSION "7.3" && \
|
|
43
|
-
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include || \
|
|
44
|
-
docker-php-ext-configure gd --with-freetype --with-jpeg && \
|
|
45
|
-
docker-php-ext-install -j$(nproc) gd && \
|
|
46
|
-
docker-php-ext-install exif; \
|
|
47
|
-
fi
|
|
48
|
-
|
|
49
|
-
#RUN compare-version $PHP_VERSION "7.3" && \
|
|
50
|
-
# docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include || \
|
|
51
|
-
# docker-php-ext-configure gd --with-freetype --with-jpeg
|
|
52
|
-
|
|
53
|
-
#RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
|
|
54
|
-
#RUN docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/
|
|
55
|
-
#RUN docker-php-ext-install gd
|
|
56
|
-
|
|
57
|
-
# Zip
|
|
58
|
-
ARG ZIP_ENABLE=false
|
|
59
|
-
RUN if [ "$ZIP_ENABLE" = "true" ]; then \
|
|
60
|
-
apt-get install -y \
|
|
61
|
-
libzip-dev \
|
|
62
|
-
zip && \
|
|
63
|
-
docker-php-ext-configure zip && \
|
|
64
|
-
docker-php-ext-install -j "$(nproc)" zip; \
|
|
65
|
-
fi
|
|
66
|
-
|
|
67
|
-
#RUN compare-version $PHP_VERSION "7.3" && \
|
|
68
|
-
# docker-php-ext-configure zip || \
|
|
69
|
-
# docker-php-ext-configure zip --with-libzip
|
|
70
|
-
|
|
71
|
-
# Composer
|
|
72
|
-
ARG COMPOSER_ENABLE=false
|
|
73
|
-
RUN if [ "$COMPOSER_ENABLE" = "true" ]; then \
|
|
74
|
-
curl -sL https://getcomposer.org/installer | php && \
|
|
75
|
-
mv composer.phar /usr/local/bin/composer && \
|
|
76
|
-
chmod +x /usr/local/bin/composer; \
|
|
77
|
-
fi
|
|
78
|
-
|
|
79
|
-
RUN a2enmod rewrite
|
|
80
|
-
RUN a2enmod headers
|
|
81
|
-
|
|
82
|
-
ADD ./.docker/apache2/sites-available/000-default.conf.conf /etc/apache2/sites-available/000-default.conf
|
|
83
|
-
ADD ./.docker/apache2/apache2.conf /etc/apache2/apache2.conf
|
|
84
|
-
COPY ./.docker/apache2/mods-available/mpm_prefork.conf /etc/apache2/mods-available/
|
|
85
|
-
|
|
86
|
-
#RUN touch /usr/local/etc/php/conf.d/mail.ini && \
|
|
87
|
-
# echo "SMTP = maildev.workspace" >> /usr/local/etc/php/conf.d/mail.ini && \
|
|
88
|
-
# echo "smtp_port = 25" >> /usr/local/etc/php/conf.d/mail.ini
|
|
89
|
-
|
|
90
|
-
#RUN touch /usr/local/etc/php/conf.d/uploads.ini && \
|
|
91
|
-
# echo "upload_max_filesize = 100M;" >> /usr/local/etc/php/conf.d/uploads.ini && \
|
|
92
|
-
# echo "post_max_size = 100M;" >> /usr/local/etc/php/conf.d/uploads.ini
|
|
93
|
-
|
|
94
|
-
#RUN touch /usr/local/etc/php/conf.d/memory.ini && \
|
|
95
|
-
# echo "memory_limit = 256M;" >> /usr/local/etc/php/conf.d/memory.ini
|
|
96
|
-
|
|
97
|
-
EXPOSE 80
|
|
98
|
-
EXPOSE 443
|
|
99
|
-
|
|
100
|
-
ENV APACHE_DOCUMENT_ROOT /var/www/html
|
|
101
|
-
WORKDIR $APACHE_DOCUMENT_ROOT
|
|
102
|
-
|
|
103
|
-
ARG UID=1000
|
|
104
|
-
ARG USER=user
|
|
105
|
-
|
|
106
|
-
RUN useradd -G www-data,root -u $UID -d /home/$USER $USER
|
|
107
|
-
RUN mkdir -p /home/$USER/.composer && \
|
|
108
|
-
chown -R $USER:$USER /home/$USER
|
|
109
|
-
|
|
110
|
-
USER $USER
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"dockerfile": "./Dockerfile",
|
|
3
|
-
"buildArgsOptions": {
|
|
4
|
-
"PHP_VERSION": {
|
|
5
|
-
"hash": false,
|
|
6
|
-
"message": "PHP version",
|
|
7
|
-
"type": "select",
|
|
8
|
-
"options": [
|
|
9
|
-
"5.6",
|
|
10
|
-
"7.3",
|
|
11
|
-
"7.4",
|
|
12
|
-
"8.0"
|
|
13
|
-
]
|
|
14
|
-
},
|
|
15
|
-
"MYSQLI_ENABLE": {
|
|
16
|
-
"message": "Enable mysqli?",
|
|
17
|
-
"type": "boolean"
|
|
18
|
-
},
|
|
19
|
-
"PDO_MYSQL_ENABLE": {
|
|
20
|
-
"message": "Enable PDO Mysql?",
|
|
21
|
-
"type": "boolean"
|
|
22
|
-
},
|
|
23
|
-
"GD_ENABLE": {
|
|
24
|
-
"message": "Enable GD?",
|
|
25
|
-
"type": "boolean"
|
|
26
|
-
},
|
|
27
|
-
"COMPOSER_ENABLE": {
|
|
28
|
-
"message": "Install composer?",
|
|
29
|
-
"type": "boolean"
|
|
30
|
-
},
|
|
31
|
-
"ZIP_ENABLE": {
|
|
32
|
-
"message": "Enable zip?",
|
|
33
|
-
"type": "boolean"
|
|
34
|
-
},
|
|
35
|
-
"NODE_VERSION": {
|
|
36
|
-
"type": "select",
|
|
37
|
-
"message": "Node version",
|
|
38
|
-
"options": [
|
|
39
|
-
"none",
|
|
40
|
-
"v17.9.1"
|
|
41
|
-
]
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
"volumes": [
|
|
45
|
-
"./:/var/www/html"
|
|
46
|
-
]
|
|
47
|
-
}
|