1
0
Fork 0
mirror of https://codeberg.org/ashley/poke.git synced 2025-06-07 16:23:04 -04:00

Move files

This commit is contained in:
Nolan Poe 2022-12-30 13:48:17 -08:00 committed by Gitea
parent 7f08eff2a2
commit c46f64c3b1
3 changed files with 6 additions and 7 deletions

View file

@ -82,16 +82,16 @@ ENV NODE_ENV production
# Final image
FROM release-base as release
# EXPOSE 3000/tcp
ENTRYPOINT [ "node", "server.js" ]
CMD [ "node", "server.js" ]
# Final image with extras
FROM release-base AS release-aio
# Grab nginx and certbot
COPY --from=proxy-installer /rpms /
COPY p/entrypoint.sh entrypoint.sh
COPY entrypoint.sh entrypoint.sh
RUN chmod +x entrypoint.sh
COPY p/nginx.conf.example /etc/nginx/conf.d/poketube.conf
COPY nginx.conf.example /etc/nginx/conf.d/poketube.conf
# EXPOSE 80/tcp
# EXPOSE 443/tcp

View file

@ -1,31 +0,0 @@
#!/usr/bin/bash
set -e
if [[ "$STAGING" == true ]]; then
TEST="--test-cert"
echo Using staging server!
else
TEST=""
echo Using production server!
fi
if [[ -v "HOSTNAME" && -v "EMAIL" ]]; then
echo Creating nginx config...
sed -i "s/SERVERNAME/$HOSTNAME/" /etc/nginx/conf.d/poketube.conf
echo Starting certbot
certbot run --nginx -n \
-d $HOSTNAME \
-d www.$HOSTNAME\
--agree-tos \
--email $EMAIL \
$TEST
echo Starting nginx
nginx -s reload
else
echo Please set HOSTNAME and/or EMAIL!
exit 1
fi
exec "$@"

View file

@ -1,19 +0,0 @@
server {
listen 80;
server_name www.SERVERNAME;
return 301 $scheme://SERVERNAME$request_uri;
}
server {
listen 80;
server_name SERVERNAME;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://localhost:3000;
proxy_ssl_session_reuse off;
proxy_set_header Host $http_host;
}
}