Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separated virtual hosts into production and dev, added tutum.staging.…
…yml file.
- Loading branch information
Showing
13 changed files
with
239 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
API_PATH=/api | ||
NGINX_VHOSTS=vhosts/nginx/*.conf | ||
APIB_PATH=/data/api/storage/app/apiary.apib | ||
DATA_ROOT=/data | ||
COOKIE_DOMAIN=spira.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
spira: | ||
image: tutum.co/iqsadmin/spira:production | ||
deployment_strategy: high_availability | ||
ports: | ||
- "80" | ||
tags: | ||
- staging | ||
volumes: | ||
- /data | ||
|
||
cache: | ||
image: redis:3.0.3 | ||
tags: | ||
- staging | ||
|
||
php: | ||
image: spira/docker-hhvm:latest | ||
environment: | ||
- APIB_PATH=/data/api/storage/app/apiary.apib | ||
- API_HOST=http://api.staging.iqstech.net:8080 | ||
- APP_HOST=http://app.staging.iqstech.net | ||
- API_PATH=/api | ||
- COOKIE_DOMAIN=spira.io | ||
- DATA_ROOT=/data | ||
- HOSTNAME_API=api.staging.iqstech.net | ||
- HOSTNAME_APP=app.staging.iqstech.net | ||
- HOSTNAME_BASE=staging.iqstech.net | ||
- HOSTNAME_FORUM=forum.staging.iqstech.net | ||
- HOSTNAME_LOGS=logs.staging.iqstech.net | ||
- HOSTNAME_MAILCATCHER=mailcatcher.staging.iqstech.net | ||
This comment has been minimized.
Sorry, something went wrong. |
||
- MYSQL_DATABASE=spira_vanilla | ||
- MYSQL_PASSWORD=spira_vanilla | ||
- MYSQL_ROOT_PASSWORD=root | ||
- MYSQL_USER=spira_vanilla | ||
- POSTGRES_DB=spira | ||
- POSTGRES_PASSWORD=spira | ||
- POSTGRES_USER=spira | ||
- PROVIDER_FACEBOOK_CLIENT_ID=1677556862475688 | ||
- PROVIDER_FACEBOOK_CLIENT_SECRET=c14de8480fbf8925fa9ab3ad1a59c6cd | ||
- PROVIDER_GOOGLE_CLIENT_ID=1055178154133-3u2un47dahaghli65uh727uff2co5cbi.apps.googleusercontent.com | ||
- PROVIDER_GOOGLE_CLIENT_SECRET=5Fp3qjVzqIuaJVh9_lR9Q-Mq | ||
- PROVIDER_TWITTER_CLIENT_ID=false | ||
- PROVIDER_TWITTER_CLIENT_SECRET=false | ||
- VANILLA_JSCONNECT_CLIENT_ID=a-client-id-random-string | ||
- VANILLA_JSCONNECT_SECRET=a-secret-phrase-random-string | ||
- VANILLA_SERVER_PORT=80 | ||
- XDEBUG_ENABLED=false | ||
links: | ||
- cache | ||
- mailcatcher | ||
This comment has been minimized.
Sorry, something went wrong.
roshangn88
Contributor
|
||
- queue | ||
privileged: true | ||
tags: | ||
- staging | ||
volumes_from: | ||
- spira | ||
|
||
queue: | ||
image: spira/docker-beanstalkd:latest | ||
tags: | ||
- staging | ||
|
||
queuerunner: | ||
image: spira/docker-artisan-queue-runner:latest | ||
environment: | ||
- APIB_PATH=/data/api/storage/app/apiary.apib | ||
- API_HOST=http://api.staging.iqstech.net:8080 | ||
- APP_HOST=http://app.staging.iqstech.net | ||
- API_PATH=/api | ||
- COOKIE_DOMAIN=spira.io | ||
- DATA_ROOT=/data | ||
- HOSTNAME_API=api.staging.iqstech.net | ||
- HOSTNAME_APP=app.staging.iqstech.net | ||
- HOSTNAME_BASE=staging.iqstech.net | ||
- HOSTNAME_FORUM=forum.staging.iqstech.net | ||
- HOSTNAME_LOGS=logs.staging.iqstech.net | ||
- HOSTNAME_MAILCATCHER=mailcatcher.staging.iqstech.net | ||
- MYSQL_DATABASE=spira_vanilla | ||
- MYSQL_PASSWORD=spira_vanilla | ||
- MYSQL_ROOT_PASSWORD=root | ||
- MYSQL_USER=spira_vanilla | ||
- POSTGRES_DB=spira | ||
- POSTGRES_PASSWORD=spira | ||
- POSTGRES_USER=spira | ||
- PROVIDER_FACEBOOK_CLIENT_ID=1677556862475688 | ||
- PROVIDER_FACEBOOK_CLIENT_SECRET=c14de8480fbf8925fa9ab3ad1a59c6cd | ||
- PROVIDER_GOOGLE_CLIENT_ID=1055178154133-3u2un47dahaghli65uh727uff2co5cbi.apps.googleusercontent.com | ||
- PROVIDER_GOOGLE_CLIENT_SECRET=5Fp3qjVzqIuaJVh9_lR9Q-Mq | ||
- PROVIDER_TWITTER_CLIENT_ID=false | ||
- PROVIDER_TWITTER_CLIENT_SECRET=false | ||
- VANILLA_JSCONNECT_CLIENT_ID=a-client-id-random-string | ||
- VANILLA_JSCONNECT_SECRET=a-secret-phrase-random-string | ||
- VANILLA_SERVER_PORT=80 | ||
- XDEBUG_ENABLED=false | ||
links: | ||
- cache | ||
- queue | ||
- web | ||
tags: | ||
- staging | ||
volumes_from: | ||
- spira | ||
|
||
web: | ||
image: spira/docker-nginx:latest | ||
environment: | ||
- DATA_ROOT=/data | ||
- HOSTNAME_API=api.staging.iqstech.net | ||
- HOSTNAME_APP=app.staging.iqstech.net | ||
- HOSTNAME_BASE=staging.iqstech.net | ||
- HOSTNAME_FORUM=forum.staging.iqstech.net | ||
- NGINX_VHOSTS=vhosts/nginx/production/*.conf | ||
links: | ||
- apimock | ||
- logviewer | ||
- mailcatcher | ||
This comment has been minimized.
Sorry, something went wrong. |
||
- php | ||
ports: | ||
- "80:80" | ||
privileged: true | ||
tags: | ||
- staging | ||
volumes_from: | ||
- spira |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Virtual Hosts | ||
Ensure when you add a feature to a vhost that you check the other folders if they need to have the config added there | ||
too. In general they will be identical, but there are some distinct differences between production and dev such as | ||
production doesn't have the api mock proxy pass, and none of the dev vhosts. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
server { | ||
client_max_body_size 20M; | ||
listen 8080; | ||
server_name %HOSTNAME_API%; | ||
|
||
root %data-root%/api/public; | ||
index index.php index.html index.htm; | ||
|
||
access_log %data-root%/logs/access-api.log; | ||
error_log %data-root%/logs/error-api.log warn; | ||
|
||
location / { | ||
try_files $uri $uri/ /index.php?$query_string; | ||
} | ||
|
||
location ~ \.php$ { | ||
include fastcgi.conf; | ||
fastcgi_pass fastgci_backend; | ||
fastcgi_param SCRIPT_FILENAME $request_filename; | ||
} | ||
|
||
location ~ /\.ht { | ||
deny all; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
server { | ||
client_max_body_size 20M; | ||
listen 80; | ||
server_name %HOSTNAME_BASE%; | ||
server_name %HOSTNAME_APP%; | ||
|
||
rewrite ^/forum(/.*)$ http://%HOSTNAME_FORUM%$1 permanent; | ||
|
||
access_log %data-root%/logs/access-app.log; | ||
error_log %data-root%/logs/error-app.log warn; | ||
|
||
# allow the source files to be read by the browser for sourcemapping | ||
location %data-root%/app/src { | ||
root /; | ||
try_files $uri $uri/ =404; | ||
} | ||
|
||
location / { | ||
root %data-root%/app/build; | ||
index index.html; | ||
try_files $uri $uri/ /index.html =404; | ||
} | ||
|
||
location /api/ { | ||
proxy_pass http://127.0.0.1:8080/; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-for $remote_addr; | ||
port_in_redirect off; | ||
#proxy_redirect http://127.0.0.1:8080 /api; | ||
proxy_connect_timeout 300; | ||
} | ||
|
||
location /auth/social/ { | ||
proxy_pass http://127.0.0.1:8080/auth/social/; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-for $remote_addr; | ||
port_in_redirect off; | ||
#proxy_redirect http://127.0.0.1:8080 /api; | ||
proxy_connect_timeout 300; | ||
} | ||
|
||
|
||
location ~ /\.ht { | ||
deny all; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
server { | ||
client_max_body_size 20M; | ||
listen 80; | ||
listen 8008; | ||
server_name %HOSTNAME_FORUM%; | ||
|
||
root %data-root%/forum/public; | ||
index index.php index.html index.htm; | ||
|
||
access_log %data-root%/logs/access-forum.log; | ||
error_log %data-root%/logs/error-forum.log warn; | ||
|
||
location / { | ||
try_files $uri $uri/ @forum; | ||
} | ||
|
||
location @forum { | ||
rewrite ^/(.+)$ /index.php?p=$1 last; | ||
} | ||
|
||
location ~ \.php$ { | ||
include fastcgi.conf; | ||
fastcgi_pass fastgci_backend; | ||
fastcgi_param SCRIPT_FILENAME $request_filename; | ||
} | ||
|
||
location ~ /\.ht { | ||
deny all; | ||
} | ||
} |
Do we need mailcather and logs URLs?
Same question applies to queuerunner