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
# NGINX reverse proxies everything that comes to edge and either | |
# sends it to the edge Node server or to our API | |
# | |
# Some common problems you might encounter: | |
# SSL_do_handshake() failed (SSL: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure) while SSL handshaking to upstream | |
# Could mean you're passing a request to the API without using | |
# proxy_ssl_server_name on; | |
# | |
# If you're getting host not found issues you may need to | |
# proxy_set_header Host ${API_HOST} |
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
#!/usr/bin/env bash | |
set -e | |
# Merge environment variable | |
envsubst '${RESOLVER}' < /home/app/nginx.conf > /home/app/nginx-complete.conf | |
# Launch nginx and node concurrently | |
nginx -g 'daemon off;' -c /home/app/nginx-complete.conf & | |
if [ "$NODE_ENV" = "development" ]; then |
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
FROM nginx:1.15.7-alpine | |
WORKDIR /home/app | |
ENV TINI_VERSION v0.18.0 | |
ENV TINI_SHA "50a5bb62e3c4fdfb442da6d1530abb2b6afacc24" | |
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static /tini | |
RUN echo "$TINI_SHA /tini" | sha1sum -c - | |
RUN chmod +x /tini |
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
// Load all charity profiles using the Raisely API | |
const profiles = await getData(api.profiles.getAll()); | |
// Sum the donations to a specific charity | |
const totalSpecific = profiles.reduce( | |
(total, profile) => total + profile.total, | |
0 | |
); | |
// Calculate the general donations by subtracting specific donations from the total of all donations | |
const totalGeneral = | |
get(this.props, "global.campaign.total", 0) - totalSpecific; |
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
const { SlimContent } = RaiselyComponents.Loading; | |
const { ProfileImage, ProgressBar } = RaiselyComponents.Atoms; | |
return ( | |
<React.Fragment> | |
{props.header} | |
<div className={`profile-tile profile-tile--detail-${detail}`}> | |
<ProfileImage | |
defaultImage={defaultImage} | |
profile={profile} |
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
async function loadCostumes(props) { | |
if (get(props, 'global.campaign.mock')) return mockCostumes; | |
try { | |
const response = await fetch(url); | |
if (!response.ok) { | |
console.error(await response.text()); | |
throw new Error('Could not load. Try refreshing the page'); | |
} | |
const body = await response.json(); |
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
useEffect(() => { | |
async function fetchData() { | |
const response = await fetch(url); | |
if (!response.ok) { | |
console.error(await response.text()); | |
throw new Error('Could not load. Try refreshing the page'); | |
} | |
const body = await response.json(); | |
const [topDonor, secondDonor] = body.data.donors; |
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
.highest-donor { | |
&__wrapper { | |
padding: 1rem; | |
background: white; | |
color: black; | |
text-align: center; | |
} | |
&__body { | |
font-size: 1.2rem; |
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
return ( | |
<div className="highest-donor__wrapper"> | |
<p className="highest-donor__body">Chris will dance to a song chosen by {leadDonor}</p> | |
<p className="highest-donor__gap">(or you for a donation of ${highestGift})</p> | |
</div> | |
); |
NewerOlder