Docker
This commit is contained in:
3
.env.sample
Normal file
3
.env.sample
Normal file
@ -0,0 +1,3 @@
|
||||
COMPOSE_PROFILES=app,db
|
||||
APP_PATH=./app
|
||||
APP_PORT=8080
|
@ -8,6 +8,8 @@ RUN docker-php-ext-install pdo pdo_mysql zip intl gd bcmath
|
||||
RUN pecl install xdebug-3.1.3 \
|
||||
&& docker-php-ext-enable xdebug
|
||||
|
||||
COPY ./php-errors.ini /usr/local/etc/php/conf.d/docker-php-errors.ini
|
||||
|
||||
COPY --from=composer /usr/bin/composer /usr/bin/composer
|
||||
|
||||
WORKDIR /code
|
||||
|
@ -11,10 +11,11 @@ services:
|
||||
container_name: incoviba_web
|
||||
<<: *restart
|
||||
ports:
|
||||
- "8080:80"
|
||||
- "${APP_PORT}:80"
|
||||
volumes:
|
||||
- .:/code
|
||||
- ${APP_PATH:-.}/:/code
|
||||
- ./nginx.conf:/etc/nginx/conf.d/default.conf
|
||||
- ./logs/proxy:/logs
|
||||
|
||||
php:
|
||||
profiles:
|
||||
@ -23,13 +24,12 @@ services:
|
||||
container_name: incoviba_php
|
||||
<<: *restart
|
||||
env_file:
|
||||
- .env
|
||||
- .db.env
|
||||
- .remote.env
|
||||
- ${APP_PATH:-.}/.env
|
||||
- ${APP_PATH:-.}/.db.env
|
||||
#- ${APP_PATH:-.}/.remote.env
|
||||
volumes:
|
||||
- .:/code
|
||||
- ./php-errors.ini:/usr/local/etc/php/conf.d/docker-php-errors.ini
|
||||
- ./logs:/logs
|
||||
- ${APP_PATH:-.}/:/code
|
||||
- ./logs/php:/logs
|
||||
|
||||
db:
|
||||
profiles:
|
||||
@ -37,9 +37,10 @@ services:
|
||||
image: mariadb:latest
|
||||
container_name: incoviba_db
|
||||
<<: *restart
|
||||
env_file: .db.env
|
||||
env_file: ${APP_PATH:-.}/.db.env
|
||||
volumes:
|
||||
- dbdata:/var/lib/mysql
|
||||
- ./incoviba.sql.gz:/docker-entrypoint-initdb.d/incoviba.sql.gz
|
||||
networks:
|
||||
- default
|
||||
- adminer_network
|
||||
@ -50,9 +51,11 @@ services:
|
||||
image: adminer:latest
|
||||
container_name: incoviba_adminer
|
||||
<<: *restart
|
||||
env_file: ${APP_PATH:-.}/.adminer.env
|
||||
networks:
|
||||
- adminer_network
|
||||
ports:
|
||||
- "8083:8080"
|
||||
env_file: .adminer.env
|
||||
|
||||
python:
|
||||
profiles:
|
||||
@ -80,7 +83,7 @@ services:
|
||||
- "8084:80"
|
||||
|
||||
volumes:
|
||||
dbdata:
|
||||
dbdata: {}
|
||||
|
||||
networks:
|
||||
adminer_network: {}
|
||||
|
@ -2,13 +2,10 @@ server {
|
||||
listen 80;
|
||||
server_name web;
|
||||
index index.php;
|
||||
error_log /code/logs/error.log;
|
||||
access_log /code/logs/access.log;
|
||||
error_log /logs/error.log;
|
||||
access_log /logs/access.log;
|
||||
root /code/public;
|
||||
|
||||
location /api {
|
||||
try_files $uri /api/index.php$is_args$args;
|
||||
}
|
||||
location / {
|
||||
try_files $uri /index.php$is_args$args;
|
||||
}
|
||||
|
Reference in New Issue
Block a user