add base of docker
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Simon Vieille 2023-02-12 21:29:16 +01:00
parent e890e17ea0
commit 6048742af4
Signed by: deblan
GPG key ID: 579388D585F70417
7 changed files with 28762 additions and 1 deletions

1
.gitignore vendored
View file

@ -35,3 +35,4 @@ yarn-error.log
/migrations/*.php
/.build
/appdata

65
Dockerfile Normal file
View file

@ -0,0 +1,65 @@
FROM php:8.2-fpm-bullseye
WORKDIR /var/www/app
RUN apt-get update && \
apt-get install -y \
cron \
libyaml-dev \
libcurl4-openssl-dev \
libicu-dev \
libpqxx-dev \
libonig-dev \
libsqlite3-dev \
libedit-dev \
libtidy-dev \
libxml2-dev \
libzip-dev \
libxslt1-dev
RUN pecl channel-update pecl.php.net && \
pecl install apcu igbinary xmlrpc-beta yaml
RUN docker-php-ext-install \
curl \
intl \
mbstring \
opcache \
pdo_pgsql \
pdo_sqlite \
pdo_mysql \
tidy \
xml \
xsl \
zip
RUN docker-php-ext-enable \
curl \
intl \
mbstring \
opcache \
pdo_pgsql \
pdo_sqlite \
pdo_mysql \
tidy \
xml \
xsl \
xmlrpc \
apcu \
zip
RUN mkdir -p \
var/cache/prod \
var/cache/dev \
&& \
chmod 777 -R var/cache/*
RUN mkdir -p var/log \
&& \
touch var/log/prod.log var/log/dev.log \
&& \
chmod 777 -R var/log/*.log
EXPOSE 9000
CMD ["./entrypoint.sh"]

View file

@ -1,5 +1,5 @@
COMPOSER ?= composer
PHP ?= php8.1
PHP ?= php
SSH ?= ssh
YARN ?= yarn
NPM_BIN ?= npm

40
docker-compose.yml Normal file
View file

@ -0,0 +1,40 @@
version: '3'
services:
web:
image: nginx:latest
volumes:
- ./:/var/www/app
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
links:
- app
env_file:
- .env.local
networks:
- app
ports:
- "1080:80"
app:
build:
context: .
user: "1000:1000"
networks:
- db
- app
volumes:
- ./:/var/www/app
db:
image: mariadb:10.3
volumes:
- ./appdata/db:/var/lib/mysql
environment:
- MARIADB_ROOT_PASSWORD=root
- MYSQL_DATABASE=app
networks:
- db
networks:
db:
external: true
gateway:
external: true
app:

25
docker/nginx/default.conf Normal file
View file

@ -0,0 +1,25 @@
server {
listen 80;
index index.php index.html;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
root /var/www/app/public;
location / {
# try to serve file directly, fallback to index.php
try_files $uri /index.php$is_args$args;
}
location ~ \.php$ {
fastcgi_pass app:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
}
location ~ \.php$ {
return 404;
}
}

15
entrypoint.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/sh
cat << BANNER
┌───┬───┬───┐
│ │ ● │ │
├───┼───┼───┤
│ │ │ ● │
├───┼───┼───┤
│ ● │ ● │ ● │
└───┴───┴───┘
BANNER
php-fpm

28615
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff