This repository has been archived by the owner on May 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Adi Mihaila
committed
Sep 10, 2020
0 parents
commit 8d322ac
Showing
7 changed files
with
107 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.idea/ | ||
!app | ||
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 @@ | ||
install: | ||
docker-compose exec php-fpm composer create-project symfony/skeleton . | ||
|
||
up: | ||
docker-compose up -d | ||
|
||
build: | ||
docker-compose build |
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,24 @@ | ||
# Symfony Docker | ||
|
||
A [Docker](https://www.docker.com/) based installer for the [Symfony](https://symfony.com) web framework. | ||
|
||
## Getting Started | ||
```` | ||
make build | ||
make up | ||
```` | ||
|
||
## Installation | ||
```` | ||
make install | ||
```` | ||
|
||
## Usage | ||
```` | ||
Open `http://127.0.0.1` in your favorite web browser | ||
```` | ||
|
||
## Debugging | ||
```` | ||
docker-compose logs -f php-fpm | ||
```` |
Empty file.
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,23 @@ | ||
version: '3.6' | ||
services: | ||
nginx: | ||
image: nginx:stable-alpine | ||
volumes: | ||
- ./app:/var/www/html | ||
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf | ||
ports: | ||
- 80:80 | ||
|
||
php-fpm: | ||
user: "${DOCKER_USER_ID}:${DOCKER_GROUP_ID}" | ||
build: | ||
context: . | ||
dockerfile: ./docker/php-fpm/Dockerfile | ||
volumes: | ||
- ./app:/var/www/html | ||
# - ./app/vendor:/var/www/html/vendor:delegated | ||
|
||
networks: | ||
default: | ||
driver_opts: | ||
com.docker.network.driver.mtu: 1450 |
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,28 @@ | ||
server { | ||
listen 80; | ||
|
||
root /var/www/html/public; | ||
client_max_body_size 10m; | ||
location / { | ||
# try to serve file directly, fallback to index.php | ||
try_files $uri /index.php$is_args$args; | ||
} | ||
|
||
location ~ ^/index\.php(/|$) { | ||
fastcgi_pass php-fpm:9000; | ||
fastcgi_split_path_info ^(.+\.php)(/.*)$; | ||
include fastcgi_params; | ||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; | ||
fastcgi_param DOCUMENT_ROOT $realpath_root; | ||
internal; | ||
} | ||
|
||
# return 404 for all other php files not matching the front controller | ||
# this prevents access to other php files you don't want to be accessible. | ||
location ~ \.php$ { | ||
return 404; | ||
} | ||
|
||
access_log /dev/stdout; | ||
error_log stderr; | ||
} |
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,21 @@ | ||
FROM php:7.4-fpm-alpine | ||
|
||
MAINTAINER [email protected] | ||
|
||
USER :33 | ||
|
||
RUN apk add --virtual build-dependencies build-base libzip-dev openssl-dev autoconf | ||
|
||
RUN set -uex; \ | ||
umask 0002; \ | ||
curl --silent --show-error https://getcomposer.org/installer | php \ | ||
&& mv composer.phar /usr/local/bin/composer \ | ||
&& chmod o+x /usr/local/bin/composer | ||
|
||
ENV COMPOSER_HOME=/tmp/composer | ||
|
||
WORKDIR /var/www/html | ||
|
||
COPY . . | ||
|
||
CMD ["php-fpm", "-F"] |