-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from toyrik/master
docker для бека
- Loading branch information
Showing
6 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ yarn-error.log | |
/.fleet | ||
/.idea | ||
/.vscode | ||
/db | ||
|
||
# ide helper | ||
/.phpstorm.meta.php | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
version: '3' | ||
|
||
services: | ||
|
||
nginx: | ||
build: | ||
context: ./docker | ||
dockerfile: nginx.docker | ||
volumes: | ||
- ./:/app | ||
depends_on: | ||
- php-fpm | ||
ports: | ||
- '8000:8000' | ||
|
||
php-fpm: | ||
build: | ||
context: ./docker | ||
dockerfile: php-fpm.docker | ||
volumes: | ||
- ./:/app | ||
|
||
php-cli: | ||
build: | ||
context: ./docker | ||
dockerfile: php-cli.docker | ||
volumes: | ||
- ./:/app | ||
- composer:/root/.composer/cache | ||
|
||
mysql: | ||
image: mariadb:10.4 | ||
ports: | ||
- '3366:3306' | ||
environment: | ||
MYSQL_ROOT_PASSWORD: root | ||
MYSQL_DATABASE: app | ||
MYSQL_USER: user | ||
MYSQL_PASSWORD: password | ||
volumes: | ||
- ./db/mariadb:/var/lib/mysql | ||
|
||
|
||
adminer: | ||
image: adminer | ||
ports: | ||
- '8880:8080' | ||
environment: | ||
ADMINER_DEFAULT_SERVER: mysql | ||
|
||
volumes: | ||
composer: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM nginx:1.25-alpine | ||
|
||
COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf | ||
|
||
WORKDIR /app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
server { | ||
listen 8000; | ||
index index.php index.php; | ||
root /app/public; | ||
|
||
location / { | ||
try_files $uri /index.php?$args; | ||
} | ||
|
||
location ~ \.php$ { | ||
fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||
fastcgi_pass php-fpm:9000; | ||
fastcgi_index index.php; | ||
include fastcgi_params; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
fastcgi_param PATH_INFO $fastcgi_path_info; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM php:8.1-cli | ||
|
||
RUN apt-get update && apt-get install -y libpq-dev zlib1g-dev zip | ||
|
||
RUN docker-php-ext-install \ | ||
pdo \ | ||
pdo_mysql \ | ||
mysqli | ||
|
||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/bin --filename=composer --quiet | ||
|
||
ENV COMPOSER_ALLOW_SUPERUSER 1 | ||
|
||
WORKDIR /app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM php:8.2-fpm | ||
|
||
RUN docker-php-ext-install \ | ||
pdo \ | ||
pdo_mysql \ | ||
mysqli | ||
|
||
WORKDIR /app |