Created
February 12, 2023 23:48
-
-
Save willitscale/5bbbe7fb78bfddee4521d1ec2c2bc883 to your computer and use it in GitHub Desktop.
streetlamp example docker-compose
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
server { | |
index index.php index.html; | |
error_log /dev/stderr; | |
access_log /dev/stdout; | |
root /app; | |
location / { | |
try_files $uri $uri/ /index.php?q=$uri&$args; | |
} | |
location ~* ^.+.(js|css|png|jpg|jpeg|gif|ico)$ { | |
access_log off; | |
expires 1d; | |
} | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass 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; | |
} | |
location = /favicon.ico { | |
log_not_found off; | |
access_log off; | |
} | |
location = /robots.txt { | |
allow all; | |
log_not_found off; | |
access_log off; | |
} | |
} |
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
version: '3' | |
services: | |
fpm: | |
image: php:8.2-fpm | |
volumes: | |
- .:/app | |
working_dir: /app | |
depends_on: | |
composer: | |
condition: service_completed_successfully | |
www: | |
image: nginx | |
volumes: | |
- .:/app | |
- ./docker/www/default.conf:/etc/nginx/conf.d/default.conf | |
depends_on: | |
fpm: | |
condition: service_started | |
ports: | |
- "8080:80" | |
composer: | |
image: composer | |
volumes: | |
- .:/app | |
working_dir: /app | |
command: composer install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment