Added docker, nginx and systemd configs
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
nginx:
|
||||
build: ./nginx
|
||||
ports:
|
||||
- '8888:80'
|
||||
volumes:
|
||||
- ./../app:/var/www
|
||||
app:
|
||||
build: web
|
||||
volumes:
|
||||
- ./../app:/var/www
|
||||
db:
|
||||
image: mariadb
|
||||
restart: always
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=rootpass
|
||||
volumes:
|
||||
- ./../data:/var/lib/mysql
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=glade_site
|
||||
Requires=docker.service
|
||||
After=docker.service
|
||||
[Service]
|
||||
Restart=always
|
||||
User=root
|
||||
Group=docker
|
||||
WorkingDirectory=/mnt/storage/glade/glade_docker
|
||||
# Shutdown container (if running) when unit is started
|
||||
ExecStartPre=/usr/bin/docker compose -f docker-compose.yml down
|
||||
# Start container when unit is started
|
||||
ExecStart=/usr/bin/docker compose -f docker-compose.yml up
|
||||
# Stop container when unit is stopped
|
||||
ExecStop=/usr/bin/docker compose -f docker-compose.yml down
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,3 @@
|
||||
FROM nginx
|
||||
RUN mkdir -p /var/www
|
||||
COPY glade.conf /etc/nginx/conf.d/default.conf
|
||||
Executable
+44
@@ -0,0 +1,44 @@
|
||||
server {
|
||||
listen *:80;
|
||||
# listen 91.109.206.118:443 ssl;
|
||||
client_max_body_size 512m;
|
||||
keepalive_timeout 70;
|
||||
large_client_header_buffers 8 16k;
|
||||
|
||||
access_log /var/log/glade.access.log main;
|
||||
error_log /var/log/glade.error.log;
|
||||
|
||||
server_name glade.1sim.online;
|
||||
|
||||
set $root /var/www;
|
||||
|
||||
location = /favicon.ico {
|
||||
root $root;
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
#include closed.conf;
|
||||
root $root;
|
||||
try_files $uri $uri/ =404;
|
||||
fastcgi_pass app:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
location / {
|
||||
root $root;
|
||||
index index.html index.htm index.php index.shtml;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen *:80;
|
||||
server_name glade.acm.petrsu.ru glade.1sim.ru;
|
||||
return 301 $scheme://glade.1sim.online$request_uri;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
FROM php:7.4-fpm
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y zip libxml2-dev libpng-dev libonig-dev
|
||||
RUN docker-php-ext-install mysqli simplexml mbstring gd
|
||||
RUN chown -R www-data:www-data /var/www
|
||||
Reference in New Issue
Block a user