fix docker
This commit is contained in:
parent
3199e573c8
commit
3b6fd9bae4
3 changed files with 38 additions and 10 deletions
|
@ -1,8 +0,0 @@
|
|||
FROM alpine:latest
|
||||
|
||||
RUN apk add --no-cache php
|
||||
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
|
||||
CMD ["php", "-S", "0.0.0.0:80"]
|
28
conf/nginx.conf
Normal file
28
conf/nginx.conf
Normal file
|
@ -0,0 +1,28 @@
|
|||
worker_processes 4;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
sendfile on;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
root /var/www/html;
|
||||
|
||||
location /public {
|
||||
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
location / {
|
||||
add_header Content-Security-Policy "base-uri 'none'";
|
||||
include fastcgi_params;
|
||||
fastcgi_pass php:9000;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,14 @@
|
|||
services:
|
||||
rit:
|
||||
build: .
|
||||
web:
|
||||
image: nginx:alpine
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./conf/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./:/var/www/html:ro
|
||||
ports:
|
||||
- '80:80'
|
||||
php:
|
||||
image: php:8-fpm
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./:/var/www/html:ro
|
||||
|
|
Loading…
Reference in a new issue