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