Improve the demo experience
This commit is contained in:
parent
512647156e
commit
40fb85c926
@ -1,4 +1,4 @@
|
||||
example
|
||||
demo
|
||||
tmp
|
||||
*.md
|
||||
web/build
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -21,7 +21,7 @@
|
||||
/Godeps
|
||||
/tmp
|
||||
/tmp/runner-build
|
||||
/example/tmp
|
||||
/demo/tmp
|
||||
|
||||
.vscode
|
||||
main
|
||||
|
@ -1,4 +1,4 @@
|
||||
title: Super Graph Development
|
||||
app_name: "Super Graph Development"
|
||||
host_port: 0.0.0.0:8080
|
||||
web_ui: true
|
||||
debug_level: 1
|
||||
@ -39,7 +39,7 @@ auth:
|
||||
version: 5.2
|
||||
|
||||
# Found in 'Rails.application.config.secret_key_base'
|
||||
secret_key_base: 0a248500a64c01184edb4d7ad3a805488f8097ac761b76aaa6c17c01dcb7af03a2f18ba61b2868134b9c7b79a122bc0dadff4367414a2d173297bfea92be5566
|
||||
secret_key_base: 0a248500a64c01184edbf8097ac...
|
||||
|
||||
# Remote cookie store. (memcache or redis)
|
||||
# url: redis://127.0.0.1:6379
|
||||
@ -66,6 +66,8 @@ database:
|
||||
dbname: app_development
|
||||
user: postgres
|
||||
password: ''
|
||||
|
||||
#schema: "public"
|
||||
#pool_size: 10
|
||||
#max_retries: 0
|
||||
#log_level: "debug"
|
||||
|
@ -1,4 +1,4 @@
|
||||
title: Super Graph Production
|
||||
app_name: "Super Graph Production"
|
||||
host_port: 0.0.0.0:8080
|
||||
web_ui: false
|
||||
debug_level: 0
|
||||
|
9
demo
Executable file
9
demo
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$1" == "setup" ]; then
|
||||
docker-compose -f rails-app/demo.yml run web rake db:drop db:create db:migrate db:seed
|
||||
elif [ "$1" == "run" ]; then
|
||||
docker-compose -f rails-app/demo.yml up
|
||||
else
|
||||
echo "./demo [setup|run]"
|
||||
fi
|
@ -3,13 +3,6 @@ services:
|
||||
db:
|
||||
image: postgres
|
||||
|
||||
# nginx:
|
||||
# image: nginx:latest
|
||||
# volumes:
|
||||
# - ./example/nginx.conf:/etc/nginx/nginx.conf
|
||||
# ports:
|
||||
# - 3001:3001
|
||||
|
||||
super_graph:
|
||||
build:
|
||||
context: .
|
||||
@ -26,13 +19,12 @@ services:
|
||||
command: fresh -c fresh.conf
|
||||
|
||||
web:
|
||||
build: example/.
|
||||
build: rails-app/.
|
||||
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
|
||||
volumes:
|
||||
- ./example:/app
|
||||
- ./rails-app:/app
|
||||
ports:
|
||||
- "3000:3000"
|
||||
depends_on:
|
||||
- db
|
||||
- super_graph
|
||||
# - nginx
|
||||
- super_graph
|
@ -1,25 +0,0 @@
|
||||
events { }
|
||||
|
||||
http {
|
||||
server {
|
||||
server_name localhost;
|
||||
listen 3001;
|
||||
|
||||
location /api/v1/graphql {
|
||||
proxy_pass http://super_graph:8080;
|
||||
proxy_redirect off;
|
||||
#rewrite ^/api/v1/graphql$ $1 break;
|
||||
}
|
||||
|
||||
location /super-graph {
|
||||
proxy_pass http://super_graph:8080;
|
||||
proxy_redirect off;
|
||||
rewrite ^/super-graph/(.*)$ /$1 break;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://web:3000;
|
||||
proxy_redirect off;
|
||||
}
|
||||
}
|
||||
}
|
@ -4,7 +4,7 @@ build_name: runner-build
|
||||
build_log: runner-build-errors.log
|
||||
valid_ext: .go, .tpl, .tmpl, .html, .yml
|
||||
no_rebuild_ext: .tpl, .tmpl, .html
|
||||
ignored: web, tmp, vendor, example, docs
|
||||
ignored: web, tmp, vendor, demo, docs
|
||||
build_delay: 600
|
||||
colors: 1
|
||||
log_color_main: cyan
|
||||
|
@ -1,4 +1,4 @@
|
||||
class ApplicationMailer < ActionMailer::Base
|
||||
default from: 'from@example.com'
|
||||
default from: 'from@demo.com'
|
||||
layout 'mailer'
|
||||
end
|
@ -32,7 +32,7 @@ Rails.application.configure do
|
||||
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
||||
|
||||
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
||||
# config.action_controller.asset_host = 'http://assets.example.com'
|
||||
# config.action_controller.asset_host = 'http://assets.demo.com'
|
||||
|
||||
# Specifies the header that your server uses for sending files.
|
||||
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
||||
@ -43,8 +43,8 @@ Rails.application.configure do
|
||||
|
||||
# Mount Action Cable outside main process or domain
|
||||
# config.action_cable.mount_path = nil
|
||||
# config.action_cable.url = 'wss://example.com/cable'
|
||||
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
|
||||
# config.action_cable.url = 'wss://demo.com/cable'
|
||||
# config.action_cable.allowed_request_origins = [ 'http://demo.com', /http:\/\/demo.*/ ]
|
||||
|
||||
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
||||
# config.force_ssl = true
|
@ -2,7 +2,7 @@
|
||||
|
||||
# ActiveSupport::Reloader.to_prepare do
|
||||
# ApplicationController.renderer.defaults.merge!(
|
||||
# http_host: 'example.org',
|
||||
# http_host: 'demo.org',
|
||||
# https: false
|
||||
# )
|
||||
# end
|
@ -18,7 +18,7 @@ Devise.setup do |config|
|
||||
# Configure the e-mail address which will be shown in Devise::Mailer,
|
||||
# note that it will be overwritten if you use your own mailer class
|
||||
# with default "from" parameter.
|
||||
config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
|
||||
config.mailer_sender = 'admin@demo.com'
|
||||
|
||||
# Configure the class responsible to send e-mails.
|
||||
# config.mailer = 'Devise::Mailer'
|
@ -18,7 +18,7 @@ purchase_count = 100
|
||||
full_name: Faker::Name.name,
|
||||
avatar: Faker::Avatar.image,
|
||||
phone: Faker::PhoneNumber.cell_phone,
|
||||
email: "user#{i}@example.com",
|
||||
email: "user#{i}@demo.com",
|
||||
password: pwd,
|
||||
password_confirmation: pwd
|
||||
)
|
@ -13,10 +13,9 @@ services:
|
||||
- "8080:8080"
|
||||
|
||||
web:
|
||||
build: example/.
|
||||
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
|
||||
volumes:
|
||||
- ./example:/app
|
||||
image: dosco/super-graph-demo:latest
|
||||
environment:
|
||||
RAILS_ENV: "development"
|
||||
ports:
|
||||
- "3000:3000"
|
||||
depends_on:
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user