Skip to content

Commit

Permalink
conf.d
Browse files Browse the repository at this point in the history
  • Loading branch information
jaewan7599 committed Dec 31, 2019
1 parent 1791ca1 commit 157437b
Show file tree
Hide file tree
Showing 4 changed files with 213 additions and 0 deletions.
23 changes: 23 additions & 0 deletions conf.d/mariadb/mariadb.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# MariaDB-specific config file.
# Read by /etc/mysql/my.cnf

[client]
# Default is Latin1, if you need UTF-8 set this (also in server section)
default-character-set = utf8mb4

[mysql]
default-character-set = utf8mb4

[mysqld]
#
# * Character sets
#
# Default is Latin1, if you need UTF-8 set all this (also in client section)
#
character-set-client-handshake = FALSE
character-set-server = utf8mb4
#collation-server = utf8_general_ci
#character_set_server = utf8
collation_server = utf8mb4_unicode_ci
# Import all .cnf files from configuration directory
# !includedir /etc/mysql/mariadb.conf.d/
92 changes: 92 additions & 0 deletions conf.d/nginx/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# https://www.nginx.com/resources/wiki/start/
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
# https://wiki.debian.org/Nginx/DirectoryStructure
#
# In most cases, administrators will remove this file from sites-enabled/ and
# leave it as reference inside of sites-available where it will continue to be
# updated by the nginx packaging team.
#
# This file will automatically load configuration files provided by other
# applications, such as Drupal or Wordpress. These applications will be made
# available underneath a path with that package name, such as /drupal8.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##

# Default server configuration
#
server {
listen 80 default_server;
listen [::]:80 default_server;

# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
#
# Read up on ssl_ciphers to ensure a secure configuration.
# See: https://bugs.debian.org/765782
#
# Self signed certs generated by the ssl-cert package
# Don't use them in a production server!
#
# include snippets/snakeoil.conf;

root /var/www/html;

# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;

server_name _;

location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri /index.html;
}

# pass PHP scripts to FastCGI server
#
#location ~ \.php$ {
# include snippets/fastcgi-php.conf;
#
# # With php-fpm (or other unix sockets):
# fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
#}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}


# Virtual Host configuration for example.com
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
#server {
# listen 80;
# listen [::]:80;
#
# server_name example.com;
#
# root /var/www/example.com;
# index index.html;
#
# location / {
# try_files $uri $uri/ =404;
# }
#}

61 changes: 61 additions & 0 deletions conf.d/nginx/policelab-server.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# https://www.nginx.com/resources/wiki/start/
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
# https://wiki.debian.org/Nginx/DirectoryStructure
#
# In most cases, administrators will remove this file from sites-enabled/ and
# leave it as reference inside of sites-available where it will continue to be
# updated by the nginx packaging team.
#
# This file will automatically load configuration files provided by other
# applications, such as Drupal or Wordpress. These applications will be made
# available underneath a path with that package name, such as /drupal8.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##

# Virtual Host configuration for example.com
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.

server {
listen 8000;
listen [::]:8000;

location /data {
root /var/www;
}

location / {
# include /etc/nginx/uwsgi_params;
# uwsgi_pass unix:/tmp/uwsgi/uwsgi.sock;
proxy_pass http://policelab-server:5000;
proxy_set_header Host $http_host;
}

# location /subscriptions {
# proxy_pass http://wiki-app:5000;
# proxy_http_version 1.1;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "Upgrade";
# proxy_set_header Host $http_host;
# }
}

# server {
# listen 8020;
# listen [::]:8020;
#
# location /data {
# root /www/dev;
# }
#
# location / {
# include /etc/nginx/uwsgi_params;
# uwsgi_pass unix:/tmp/uwsgi-dev.sock;
# }
# }

37 changes: 37 additions & 0 deletions conf.d/supervisor/supervisord.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
; supervisor config file

[unix_http_server]
file=/var/run/supervisor.sock ; (the path to the socket file)
chmod=0700 ; sockef file mode (default 0700)

[supervisord]
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP)
; environment = FLASK_ENV="development"

; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket

; The [include] section can just contain the "files" setting. This
; setting can list multiple files (separated by whitespace or
; newlines). It can also contain wildcards. The filenames are
; interpreted as relative to this file. Included files *cannot*
; include files themselves.

[program:gunicorn]
user = policelab-server
# command=gunicorn -k geventwebsocket.gunicorn.workers.GeventWebSocketWorker -w 4 -b 0.0.0.0:5000 app.wsgi
command=gunicorn -w 4 -b 0.0.0.0:5000 app.wsgi
redirect_stderr=true

; [program:celery]
; user = wiki-app
; command=celery -A main.celery worker
; redirect_stderr=true

0 comments on commit 157437b

Please sign in to comment.