JavaScript
- 34 ответа
- 0 вопросов
32
Вклад в тег
server {
listen 80;
server_name localhost;
location / {
root /var/www/html;
index index.php;
}
location /metrics {
stub_status;
allow 127.0.0.1;
deny all;
}
location ~ \.php$ {
root /var/www/html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/html$fastcgi_script_name;
include fastcgi_params;
}
}
# Dockerfile
...
# Установка прав доступа в скрипте инициализации
COPY ./set-permissions.sh /usr/local/bin/set-permissions.sh
RUN chmod +x /usr/local/bin/set-permissions.sh
# Запуск скрипта при старте контейнера
ENTRYPOINT ["set-permissions.sh"]
CMD ["apache2-foreground"]
# set-permissions.sh
#!/bin/bash
chmod o+w /app/web/uploads
chmod o+w /app/web/uploads/result
exec "$@"