Skip to content

Commit 525a3c7

Browse files
committed
tweak docker and github type defs
1 parent 2a393f8 commit 525a3c7

File tree

6 files changed

+42
-6
lines changed

6 files changed

+42
-6
lines changed

Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ RUN yarn global add gatsby-cli
33
WORKDIR /app
44
COPY . ./
55
RUN yarn --pure-lockfile
6-
RUN chmod +x seed_dummy_data.sh
7-
RUN ./seed_dummy_data.sh
6+
CMD ["./docker-start.sh"]

docker-compose.yml

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ services:
44
build:
55
context: .
66
dockerfile: Dockerfile
7-
command: yarn workspace gatsby-theme-rpsych-cohend gatsby develop -H 0.0.0.0
87
ports:
98
- "8000:8000"
109
volumes:

docker-start.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
echo "## Starting gatsby in develop mode"
3+
yarn workspace gatsby-theme-rpsych-cohend gatsby develop -H 0.0.0.0

gatsby-theme-rpsych-viz/src/components/GitHubSponsors.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ const GitHubSponsors = React.memo(() => {
2424
const classes = useStyles();
2525
const data = useStaticQuery(gitHubQuery);
2626
const { t } = useTranslation("blog");
27-
const gitHubSponsors =
28-
data.allGithubData.nodes[0].data.user.sponsorshipsAsMaintainer.nodes;
27+
const gitHubSponsors = data.allGithubData
28+
? data.allGithubData.nodes[0].data.user.sponsorshipsAsMaintainer.nodes
29+
: [];
2930

3031
return (
3132
<div>

gatsby-theme-rpsych/gatsby-node.js

+34
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,40 @@ exports.createSchemaCustomization = ({ actions }) => {
3434
localName: String
3535
name: String
3636
}
37+
type allGithubData implements Node {
38+
filter: String
39+
sort: String
40+
skip: String
41+
limit: String
42+
nodes: GitHubNode
43+
}
44+
type GitHubNode {
45+
id: String
46+
data: GitHubData
47+
}
48+
type GitHubData {
49+
user: GitHubUser
50+
}
51+
type GitHubUser {
52+
sponsorshipsAsMaintainer: GitHubSponsorshipsAsMaintainer
53+
}
54+
type GitHubSponsorshipsAsMaintainer implements Node {
55+
nodes: SponsorNode
56+
}
57+
type SponsorNode {
58+
tier: GitHubTier
59+
sponsor: GitHubSponsor
60+
}
61+
type GitHubTier {
62+
monthlyPriceInDollars: Int
63+
createdAt: Date
64+
}
65+
type GitHubSponsor {
66+
name: String
67+
avatarUrl: String
68+
url: String
69+
login: String
70+
}
3771
`);
3872
};
3973

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
echo "## Extracting temp assets/data"
22
tar -xzvf gatsby-theme-rpsych/assets/profile.tar.gz
33
tar -xzvf gatsby-theme-rpsych/assets/Posters.tar.gz
44
tar -xzvf gatsby-theme-rpsych/assets/coffee-supporters.tar.gz

0 commit comments

Comments
 (0)