Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy example on heroku #30

Merged
merged 12 commits into from
Jul 5, 2022
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: bin/start-nginx-solo
39 changes: 39 additions & 0 deletions config/nginx.conf.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
daemon off;
# Heroku dynos have at least 4 cores.
worker_processes <%= ENV['NGINX_WORKERS'] || 4 %>;

events {
use epoll;
accept_mutex on;
worker_connections <%= ENV['NGINX_WORKER_CONNECTIONS'] || 1024 %>;
}

http {
gzip on;
gzip_comp_level 2;
gzip_min_length 512;
gzip_proxied any; # Heroku router sends Via header

server_tokens off;

log_format l2met 'measure#nginx.service=$request_time request_id=$http_x_request_id';
access_log <%= ENV['NGINX_ACCESS_LOG_PATH'] || 'logs/nginx/access.log' %> l2met;
error_log <%= ENV['NGINX_ERROR_LOG_PATH'] || 'logs/nginx/error.log' %>;


include mime.types;
default_type application/octet-stream;
sendfile on;

# Must read the body in 5 seconds.
client_body_timeout <%= ENV['NGINX_CLIENT_BODY_TIMEOUT'] || 5 %>;

server {
listen <%= ENV["PORT"] %>;
server_name _;
keepalive_timeout 5;
client_max_body_size <%= ENV['NGINX_CLIENT_MAX_BODY_SIZE'] || 1 %>M;

root /app/packages/example/public;
}
}
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@
"./packages/*"
],
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.25.0",
"@typescript-eslint/parser": "^5.25.0",
"eslint": "^8.12.0",
"@typescript-eslint/eslint-plugin": "^5.29.0",
"@typescript-eslint/parser": "^5.29.0",
"eslint": "^8.18.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-json": "^3.1.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.30.0",
"prettier": "^2.6.2",
"stylelint": "^14.6.1",
"stylelint-config-standard": "^25.0.0"
"prettier": "^2.7.1",
"stylelint": "^14.9.1",
"stylelint-config-standard": "^26.0.0"
}
}
10 changes: 0 additions & 10 deletions packages/example/src/pages/index.js

This file was deleted.

18 changes: 18 additions & 0 deletions packages/example/src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react'
import { Link } from 'gatsby'

export default function Home() {
return (
<div>
<h1>Gatsby Theme: Iterative</h1>
<p>
Welcome to the documentation and example website for Iterative&apos;s
website engine!
</p>
<p>
This theme is primarily related to adding a documentation engine, which
you can see <Link to="/doc">here!</Link>
</p>
</div>
)
}
4 changes: 2 additions & 2 deletions packages/gatsby-theme-iterative/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"iso-url": "^1.2.1",
"isomorphic-fetch": "^3.0.0",
"lodash": "^4.17.21",
"nanoid": "^3.3.2",
"nanoid": "^4.0.0",
"perfect-scrollbar": "^1.5.5",
"postcss": "^8.4.14",
"postcss-color-mod-function": "^3.0.3",
Expand All @@ -70,7 +70,7 @@
"remark-preset-lint-recommended": "^6.1.2",
"reset-css": "^5.0.1",
"scroll": "^3.0.1",
"tailwindcss": "3.0.23",
"tailwindcss": "^3.1.3",
"title-case": "^3.0.3",
"unified": "^10.1.2",
"unist-util-remove-position": "^4.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,13 @@ const MainLayout: LayoutComponent = ({
}, [])

return (
<>
<div className={styles.layoutWrapper}>
<LayoutHeader modifiers={modifiers} />
<div
id="layoutContent"
// className={styles.pageContent}
>
<div id="layoutContent" className={styles.layoutContent}>
{children}
</div>
<LayoutFooter />
</>
</div>
)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
:global {
html,
body,
#___gatsby,
#gatsby-focus-wrapper {
height: 100%;
}
}

.layoutWrapper {
height: 100%;
display: flex;
flex-flow: column nowrap;
}

.layoutContent {
flex: 1;
}

.mainLayout {
font-weight: 400 !important;
background-color: #fff;
Expand Down
Loading