Docker
This commit is contained in:
12
Dockerfile
Normal file
12
Dockerfile
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
FROM php:8-fpm
|
||||||
|
|
||||||
|
RUN apt-get update -y && apt-get install -y zip libzip-dev git
|
||||||
|
|
||||||
|
RUN docker-php-ext-install pdo pdo_mysql zip
|
||||||
|
|
||||||
|
RUN pecl install xdebug-3.1.1 \
|
||||||
|
&& docker-php-ext-enable xdebug
|
||||||
|
|
||||||
|
WORKDIR /code
|
||||||
|
|
||||||
|
COPY --from=composer /usr/bin/composer /usr/bin/composer
|
54
docker-compose.yml
Normal file
54
docker-compose.yml
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
version: '3'
|
||||||
|
|
||||||
|
x-restart:
|
||||||
|
&restart
|
||||||
|
restart: unless-stopped
|
||||||
|
x-timezone:
|
||||||
|
&tz
|
||||||
|
TZ: America/Santiago
|
||||||
|
|
||||||
|
services:
|
||||||
|
proxy:
|
||||||
|
image: nginx:alpine
|
||||||
|
container_name: incoviba_proxy
|
||||||
|
<<: *restart
|
||||||
|
environment: *tz
|
||||||
|
ports:
|
||||||
|
- "8081:80"
|
||||||
|
volumes:
|
||||||
|
- ./:/code
|
||||||
|
- ./nginx.conf:/etc/nginx/conf.d/default.conf
|
||||||
|
api:
|
||||||
|
build:
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
container_name: incoviba_api
|
||||||
|
<<: *restart
|
||||||
|
environment: *tz
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
- .db.env
|
||||||
|
- .api.key
|
||||||
|
volumes:
|
||||||
|
- ./:/code
|
||||||
|
- ./php.ini:/usr/local/etc/php/conf.d/docker.ini
|
||||||
|
- ./logs/php/:/var/log/php/
|
||||||
|
|
||||||
|
db:
|
||||||
|
container_name: db
|
||||||
|
image: mariadb:latest
|
||||||
|
<<: *restart
|
||||||
|
environment: *tz
|
||||||
|
env_file: .db.env
|
||||||
|
volumes:
|
||||||
|
- incoviba_data:/var/lib/mysql
|
||||||
|
adminer:
|
||||||
|
container_name: adminer
|
||||||
|
image: adminer:latest
|
||||||
|
<<: *restart
|
||||||
|
environment: *tz
|
||||||
|
ports:
|
||||||
|
- "8083:8080"
|
||||||
|
env_file: .adminer.env
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
incoviba_data: {}
|
22
nginx.conf
Normal file
22
nginx.conf
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name api;
|
||||||
|
index index.php;
|
||||||
|
error_log /code/logs/error.log;
|
||||||
|
access_log /code/logs/access.log;
|
||||||
|
root /code/public;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri /index.php$is_args$args;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ \.php {
|
||||||
|
try_files $uri =404;
|
||||||
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
fastcgi_pass api:9000;
|
||||||
|
}
|
||||||
|
}
|
BIN
php.prod.ini
Normal file
BIN
php.prod.ini
Normal file
Binary file not shown.
Reference in New Issue
Block a user