Compare commits

..

No commits in common. "d6dc6b7d61f14eeb8cd90b9276529969b6a52922" and "a588be82b40b7b8ee4c55969287a562af339ba8e" have entirely different histories.

5 changed files with 8 additions and 48 deletions

View File

@ -1,21 +1,7 @@
FROM perl:5.32.1
# Move it
FROM perl:5.22
RUN cpanm Mojolicious
WORKDIR /opt
COPY public/ ./public/
COPY templates/ ./templates/
COPY wethepeople.pl .
# Upgrade
RUN apt-get update
RUN apt-get -y upgrade
# Install Mojo
RUN cpanm Mojolicious
# Set up environment
ENV MOJO_REVERSE_PROXY=1
EXPOSE 3000
# Send it
CMD ["perl", "wethepeople.pl", "prefork", "-m", "production"]
CMD ["perl", "wethepeople.pl", "daemon", "-m", "production"]

View File

@ -582,9 +582,9 @@ them to the start of each source file to most effectively state the exclusion
of warranty; and each file should have at least the "copyright" line and a
pointer to where the full notice is found.
Source code for http://wethepeople.win
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 2021 Daniel Bowling
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free

View File

@ -1,25 +1,3 @@
# wethepeople.win
Source code for http://wethepeople.win
## Building/Testing
### Build the container locally
docker build -t wethepeople.pl .
### Run it locally
docker run -p 3000:3000 wethepeople.pl:latest
Pull up [http://localhost:3000](http://localhost:3000) and poke around
## Tagging/Pushing
### Tag the image
docker tag wethepeople.pl gcr.io/www-swagg/wethepeople.pl
### Send it
docker push gcr.io/www-swagg/wethepeople.pl

View File

@ -67,7 +67,8 @@
<!-- Soundtrack -->
<audio src="/assets/curb.mp3"
id="soundtrack"
preload="auto"></audio>
preload="auto"
autoplay></audio>
<!-- Add the background image -->
<div class="bg"></div>
</body>

View File

@ -5,18 +5,13 @@ use Mojolicious::Lite;
get '/' => sub {
my ($c) = @_;
my $hostHeader = $c->req->headers->host();
my $scheme = $c->req->url->base->scheme();
if ($hostHeader =~ /www.wethepeople.win(|:[0-9]{1,5})/) {
$c->render()
}
else {
$c->redirect_to("$scheme://www.wethepeople.win")
$c->redirect_to('http://www.wethepeople.win')
}
# Opt out of Google FLoC
# https://paramdeo.com/blog/opting-your-website-out-of-googles-floc-network
$c->res->headers->header('Permissions-Policy', 'interest-cohort=()');
} => 'index';
app->start();