new docker image
This commit is contained in:
parent
15fdd41cad
commit
4f906ef801
|
@ -1,9 +1,6 @@
|
||||||
node_modules
|
node_modules
|
||||||
/.env
|
.env
|
||||||
/.git
|
.git
|
||||||
/.vscode
|
.vscode
|
||||||
/vendor
|
vendor
|
||||||
/cache/latte/*
|
cache
|
||||||
!/cache/latte/.gitkeep
|
|
||||||
/cache/api/*
|
|
||||||
!/cache/api/.gitkeep
|
|
||||||
|
|
39
Dockerfile
39
Dockerfile
|
@ -1,25 +1,22 @@
|
||||||
FROM php:8.2-apache
|
FROM trafex/php-nginx:latest
|
||||||
WORKDIR /var/www/html
|
|
||||||
|
# Add composer
|
||||||
COPY --from=composer /usr/bin/composer /usr/bin/composer
|
COPY --from=composer /usr/bin/composer /usr/bin/composer
|
||||||
RUN apt update -y && apt upgrade -y \
|
|
||||||
&& apt install -y --no-install-recommends libzip-dev \
|
|
||||||
&& pecl install redis zip \
|
|
||||||
&& docker-php-ext-enable redis zip \
|
|
||||||
&& a2enmod rewrite headers \
|
|
||||||
&& mkdir /cache \
|
|
||||||
&& chown -R www-data:www-data /cache \
|
|
||||||
&& rm -rf /var/www/html/*
|
|
||||||
|
|
||||||
# Copy project to /var/www/html
|
# Copy config
|
||||||
COPY . .
|
COPY ./misc/setup/docker/php.ini /etc/php81/conf.d/settings.ini
|
||||||
|
|
||||||
# Run composer and clean
|
USER root
|
||||||
RUN composer update --no-cache \
|
# Create cache folder
|
||||||
&& composer install --no-interaction --optimize-autoloader --no-dev --no-cache \
|
RUN mkdir /cache && chown -R nobody:nogroup /cache
|
||||||
&& apt autoclean -y \
|
# Install deps
|
||||||
&& apt autoremove -y \
|
RUN apk add --no-cache php81-redis php81-zip php81-tokenizer
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
USER nobody
|
||||||
&& rm -rf /usr/bin/composer
|
|
||||||
|
|
||||||
EXPOSE 80
|
# Copy source
|
||||||
CMD apachectl -D FOREGROUND
|
COPY --chown=nobody . /var/www/html
|
||||||
|
|
||||||
|
# Dependencies
|
||||||
|
RUN composer install --no-interaction --optimize-autoloader --no-dev --no-cache
|
||||||
|
|
||||||
|
EXPOSE 8080
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
"ext-mbstring": "*",
|
"ext-mbstring": "*",
|
||||||
"latte/latte": "^2.11",
|
"latte/latte": "^2.11",
|
||||||
"bramus/router": "^1.6",
|
"bramus/router": "^1.6",
|
||||||
"josegonzalez/dotenv": "dev-master",
|
"pablouser1/tikscraper": "^2.3",
|
||||||
"pablouser1/tikscraper": "^2.3"
|
"josegonzalez/dotenv": "^4.0"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
|
9
composer.lock
generated
9
composer.lock
generated
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "92c34c828c921f4e49b6dc6ab9bf3d8b",
|
"content-hash": "f94f92790bfe52bdf38e6bd9ba80f40a",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "bramus/router",
|
"name": "bramus/router",
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "josegonzalez/dotenv",
|
"name": "josegonzalez/dotenv",
|
||||||
"version": "dev-master",
|
"version": "4.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/josegonzalez/php-dotenv.git",
|
"url": "https://github.com/josegonzalez/php-dotenv.git",
|
||||||
|
@ -120,7 +120,6 @@
|
||||||
"php-mock/php-mock-phpunit": "~1.1||~2.0",
|
"php-mock/php-mock-phpunit": "~1.1||~2.0",
|
||||||
"squizlabs/php_codesniffer": "~2.9||~3.7"
|
"squizlabs/php_codesniffer": "~2.9||~3.7"
|
||||||
},
|
},
|
||||||
"default-branch": true,
|
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-0": {
|
||||||
|
@ -678,9 +677,7 @@
|
||||||
"packages-dev": [],
|
"packages-dev": [],
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"stability-flags": {
|
"stability-flags": [],
|
||||||
"josegonzalez/dotenv": 20
|
|
||||||
},
|
|
||||||
"prefer-stable": false,
|
"prefer-stable": false,
|
||||||
"prefer-lowest": false,
|
"prefer-lowest": false,
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|
|
@ -5,7 +5,7 @@ services:
|
||||||
container_name: proxitok-web
|
container_name: proxitok-web
|
||||||
image: ghcr.io/pablouser1/proxitok:master
|
image: ghcr.io/pablouser1/proxitok:master
|
||||||
ports:
|
ports:
|
||||||
- 8080:80
|
- 8080:8080
|
||||||
environment:
|
environment:
|
||||||
- LATTE_CACHE=/cache
|
- LATTE_CACHE=/cache
|
||||||
- API_CACHE=redis
|
- API_CACHE=redis
|
||||||
|
|
4
misc/setup/docker/php.ini
Normal file
4
misc/setup/docker/php.ini
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
variables_order="EGPCS"
|
||||||
|
[Date]
|
||||||
|
date.timezone="UTC"
|
||||||
|
expose_php=Off
|
Loading…
Reference in a new issue