Nginx Server Blocks configuration to run more than one Laravel 5.1 web-app off of a single Linux server
- PHP package: php5-fpm php5-mcrypt php5-mysql
- Laravel 5.1
- Nginx 1.8
| import React from "react"; | |
| import { render } from "react-dom"; | |
| const ParentComponent = React.createClass({ | |
| getDefaultProps: function() { | |
| console.log("ParentComponent - getDefaultProps"); | |
| }, | |
| getInitialState: function() { | |
| console.log("ParentComponent - getInitialState"); | |
| return { text: "" }; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This script will read your secret file and set each line as an env variable in your container.
I' assuming that you already has a entrypoint file in your Dockerfile. So now, you need to copy and paste the contents of set_env_secrets.sh to your entrypoint(you don't need the first line).
Now, you need to create a secret, the name could be whatever you like. I'm using the name of my application as a pattern for my secrets name. For this example, my secret name will be super-project and the content will be.
| apiVersion: extensions/v1beta1 | |
| kind: DaemonSet | |
| metadata: | |
| labels: | |
| name: logspout | |
| name: logspout | |
| namespace: default | |
| spec: | |
| selector: | |
| matchLabels: |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| void main() { | |
| runApp(_SwitchingThemeApp()); | |
| } | |
| /// Properties that help me keep track of the example being run. | |
| bool _useMaterial = false; | |
| class _SwitchingThemeApp extends StatefulWidget { | |
| @override | |
| _SwitchingThemeAppState createState() => _SwitchingThemeAppState(); |
When setting these options consider the following:
sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log| { | |
| "estados": [ | |
| { | |
| "sigla": "AC", | |
| "nome": "Acre", | |
| "cidades": [ | |
| "Acrelândia", | |
| "Assis Brasil", | |
| "Brasiléia", | |
| "Bujari", |