Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Perplx
Jun 26, 2004


Best viewed on Orgasma Plasma
Lipstick Apathy
I would recommend cloudflare for free dns hosting, its pretty big and lots of foss support it directly like letsencrypt.

The cloud providers are real cheap but the variable pricing could be bad if someone want to throw a botnet at you (very unlikely), for the absolute cheapest fixed pricing vps hosting checkout https://lowendbox.com/.

Adbot
ADBOT LOVES YOU

frogbs
May 5, 2004
Well well well
Not sure if this is the right thread for it, but I’m just getting into using docker to host some stuff. Anyone have any reccomendations for a good way to get certbot/lets encrypt working with docker-compose and nginx-proxy? I want to be able to set each image up on a sub domain with a virtual_host entry in the docker compose file, but the lets encrypt part seems a little more complicated. Should I forget about trying to use certbot in a container?

Edit: so far this seems like my best bet? https://github.com/evertramos/nginx-proxy-automation

frogbs fucked around with this message at 05:39 on Mar 16, 2021

Impotence
Nov 8, 2010
Lipstick Apathy
You can always just run separeite certbot with volume mounts (so the certbot container writes to, say, /sharedhostfolder/whatever/key.pem and you volume-mount /sharedhostfolder/whatever onto nginx container

Perplx
Jun 26, 2004


Best viewed on Orgasma Plasma
Lipstick Apathy
I gave up containerizing letsencrypt, I do it on the host and added reloading nginx to the post install hook.

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself
i've actually done this before and this is the guide i used:

https://pentacent.medium.com/nginx-and-lets-encrypt-with-docker-in-less-than-5-minutes-b4b8a60d3a71

hopefully that helps. i remember having trouble with it as well

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
I am a docker noob but I run a container called 'router' that has nginx + certbot which acts as a reverse proxy to apps running in other containers.

I tend to avoid any third party dockerfile just because I like to keep things simple and avoid having to keep up with upstream changes over time. Plus I've relied on too many third party things that get abandoned eventually.

Here's my router Dockerfile:
code:
FROM debian:buster-slim

RUN apt-get update \
 && DEBIAN_FRONTEND=noninteractive apt-get install -y \
    nginx \
    certbot \
    python3-certbot-dns-route53 \
    gettext-base \
    apache2-utils \
 && rm -rf /var/lib/apt/lists/* \
 && rm /etc/nginx/sites-enabled/default \
 && service nginx stop \
 && rm /etc/init.d/nginx

COPY nginx/nginx.conf /etc/nginx/nginx.conf
COPY nginx/conf.d/app.conf.template /etc/nginx/conf.d/app.conf.template

# Forward request logs to Docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
 && ln -sf /dev/stderr /var/log/nginx/error.log

COPY runserver.sh /root/runserver.sh

# From https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-docker/
STOPSIGNAL SIGTERM

EXPOSE 80
EXPOSE 443

USER root
WORKDIR /root

CMD /root/runserver.sh
Then my runserver.sh:
code:
#!/usr/bin/env bash

set -x
set -e

certbot certonly --dns-route53 --email somebody@somewhere.net --server $LETSENCRYPT_SERVER --agree-tos --non-interactive --domain $AWFULYEARBOOK_DOMAIN --domain "*.$AWFULYEARBOOK_DOMAIN"
certbot certonly --dns-route53 --email somebody@somewhere.net --server $LETSENCRYPT_SERVER --agree-tos --non-interactive --domain $HOMEPAGE_DOMAIN --domain "*.$HOMEPAGE_DOMAIN"

# https://serverfault.com/a/919212/280309
envsubst '${AWFULYEARBOOK_DOMAIN} ${HOMEPAGE_DOMAIN} ${HOME_IP}' < /etc/nginx/conf.d/app.conf.template > /etc/nginx/conf.d/app.conf

cat /root/.fletchowns_http_password | htpasswd -i -c /etc/nginx/htpasswd-fletch fletch

# Run nginx
nginx -g 'daemon off;'

Here's part of my app.conf.template which uses the docker resolver IP and the docker host names for proxy_pass:
code:
server {
    charset utf8;
    listen 80;
    listen [::]:80;

    # Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response.
    return 301 https://$host$request_uri;
}

server {
    charset utf-8;
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    # Set resolver so we can reference docker hosts by name
    # https://stackoverflow.com/a/37656784/400503
    resolver 127.0.0.11 ipv6=off;

    server_name ${AWFULYEARBOOK_DOMAIN};

    # error_log /var/log/nginx-special-error.log debug;

    client_max_body_size 10m;

    ssl_certificate /etc/letsencrypt/live/${AWFULYEARBOOK_DOMAIN}/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/${AWFULYEARBOOK_DOMAIN}/privkey.pem;
    ssl_trusted_certificate /etc/letsencrypt/live/${AWFULYEARBOOK_DOMAIN}/fullchain.pem;

    location / {
        proxy_pass http://awfulyearbook-webserver.fletchowns-network;
    }
}
I create the network manually before doing a docker-compose up since the network is shared across multiple repositories:
code:
docker network create -d bridge --subnet=172.69.0.0/16 fletchowns-network
I have a volume mounted for letsencrypt in my docker-compose.yml:
code:
  router:
    build:
      context: ./router
    image: fletchowns/router
    container_name: router
    restart: unless-stopped
    tty: true
    environment:
      - HOMEPAGE_DOMAIN
      - AWFULYEARBOOK_DOMAIN
      - LETSENCRYPT_SERVER
      - HOME_IP
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - letsencrypt:/etc/letsencrypt

namlosh
Feb 11, 2014

I name this haircut "The Sad Rhino".
Are you getting a wildcard cert from letsencrypt? I did that and it made it much easier to configure everything else. I haven’t spent the time to automate it though, so that could be a deal breaker for you

frogbs
May 5, 2004
Well well well
Thanks for the help everyone! I did also see some reccomendations for Traefik out there for accomplishing the same thing. Anyone used it before? This was a guide I found: https://www.digitalocean.com/community/tutorials/how-to-use-traefik-v2-as-a-reverse-proxy-for-docker-containers-on-ubuntu-20-04

Grump posted:

i've actually done this before and this is the guide i used:

https://pentacent.medium.com/nginx-and-lets-encrypt-with-docker-in-less-than-5-minutes-b4b8a60d3a71

hopefully that helps. i remember having trouble with it as well

This looks like a good guide, i'm going to try running through this next, thank you!

fletcher posted:

I am a docker noob but I run a container called 'router' that has nginx + certbot which acts as a reverse proxy to apps running in other containers.

I tend to avoid any third party dockerfile just because I like to keep things simple and avoid having to keep up with upstream changes over time. Plus I've relied on too many third party things that get abandoned eventually.

Whoa, I don't think you're a docker noob! That's a good point about not relying on 3rd party stuff, I suppose that should be my eventual goal too.

namlosh posted:

Are you getting a wildcard cert from letsencrypt? I did that and it made it much easier to configure everything else. I haven’t spent the time to automate it though, so that could be a deal breaker for you

I wasn't planning on it, the goal was to have automatic, renewing certs per sub-domain. Although I could see how a wildcard might make things easier. I'll look into it if the other options don't pan out. Thank you!

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

frogbs posted:

Thanks for the help everyone! I did also see some reccomendations for Traefik out there for accomplishing the same thing. Anyone used it before? This was a guide I found: https://www.digitalocean.com/community/tutorials/how-to-use-traefik-v2-as-a-reverse-proxy-for-docker-containers-on-ubuntu-20-04

I looked into Traefik but saw some posts about people frustrated with debugging issues when they came up. I ended up going with nginx since I was already familiar with it and knew it would handle my use case without much hassle. Nginx also seemed like the safer bet as to what will still be supported 5-10 years from now.

Bank
Feb 20, 2004
Figured it out!

Bank fucked around with this message at 17:09 on Mar 18, 2021

Boba Pearl
Dec 27, 2019

by Athanatos
So I have light computer-toucher experience (I've done hell-desk for 4 years, but not much outside of that,) and I'm wanting to create a website to host my stories, drawings, and animatics that I've created. I need this because A.) Some of the content I create doesn't work in github after a certain file size, B.) The videos I make are worthless without the story surrounding them, and finally C.) I'm switching some of my stories from one forum to another, and want to have a place that isn't paywalled if people want to read my old content. (The CYOA forum here has like a 20 users max, less than 8 total read my stories and I want to move to a place that has hundreds of thousands of people registered to read these kind of stories. I want to reach a larger audience.)

I want to be able to keep my stories separate from each other, and maybe have custom or thematic backgrounds for each one, be able to have a next button that moves between posts on the stories, and be able to embed videos and images to the story as necessary. I'll probably just be copy pasting them off the forums to a google doc, and then using a program that transfer between google docs and html.

I want to host the images and videos I create in such a way, that I can post the on forums and the like and they would embed like normal.

I really don't see more than maybe 20 - 100 people using this, and even that is overwhelmingly optimistic, that being said I still would want a host that would make me re-do everything if I end up getting larger traffic than I had planned. I don't think I need a big-girl host like AWS or something, just a simple website host that'll easily let me format and post images, videos, and texts.

Do you have any recommendations?

Boba Pearl fucked around with this message at 22:31 on Mar 18, 2021

CarForumPoster
Jun 26, 2013

⚡POWER⚡

Boba Pearl posted:

So I have light computer-toucher experience (I've done hell-desk for 4 years, but not much outside of that,) and I'm wanting to create a website to host my stories, drawings, and animatics that I've created. I need this because A.) Some of the content I create doesn't work in github after a certain file size, B.) The videos I make are worthless without the story surrounding them, and finally C.) I'm switching some of my stories from one forum to another, and want to have a place that isn't paywalled if people want to read my old content. (The CYOA forum here has like a 20 users max, less than 8 total read my stories and I want to move to a place that has hundreds of thousands of people registered to read these kind of stories. I want to reach a larger audience.)

I want to be able to keep my stories separate from each other, and maybe have custom or thematic backgrounds for each one, be able to have a next button that moves between posts on the stories, and be able to embed videos and images to the story as necessary. I'll probably just be copy pasting them off the forums to a google doc, and then using a program that transfer between google docs and html.

I want to host the images and videos I create in such a way, that I can post the on forums and the like and they would embed like normal.

I really don't see more than maybe 20 - 100 people using this, and even that is overwhelmingly optimistic, that being said I still would want a host that would make me re-do everything if I end up getting larger traffic than I had planned. I don't think I need a big-girl host like AWS or something, just a simple website host that'll easily let me format and post images, videos, and texts.

Do you have any recommendations?

Would wix do what you want?

Boba Pearl
Dec 27, 2019

by Athanatos

CarForumPoster posted:

Would wix do what you want?

No both the storage page, and the video time are way too low, especially for 15$

I have adobe dreamweaver if that makes things better?

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano
Is there a reason the videos can't go on YouTube or Vimeo

Twerk from Home
Jan 17, 2009

This avatar brought to you by the 'save our dead gay forums' foundation.

Boba Pearl posted:

So I have light computer-toucher experience (I've done hell-desk for 4 years, but not much outside of that,) and I'm wanting to create a website to host my stories, drawings, and animatics that I've created. I need this because A.) Some of the content I create doesn't work in github after a certain file size, B.) The videos I make are worthless without the story surrounding them, and finally C.) I'm switching some of my stories from one forum to another, and want to have a place that isn't paywalled if people want to read my old content. (The CYOA forum here has like a 20 users max, less than 8 total read my stories and I want to move to a place that has hundreds of thousands of people registered to read these kind of stories. I want to reach a larger audience.)

I want to be able to keep my stories separate from each other, and maybe have custom or thematic backgrounds for each one, be able to have a next button that moves between posts on the stories, and be able to embed videos and images to the story as necessary. I'll probably just be copy pasting them off the forums to a google doc, and then using a program that transfer between google docs and html.

I want to host the images and videos I create in such a way, that I can post the on forums and the like and they would embed like normal.

I really don't see more than maybe 20 - 100 people using this, and even that is overwhelmingly optimistic, that being said I still would want a host that would make me re-do everything if I end up getting larger traffic than I had planned. I don't think I need a big-girl host like AWS or something, just a simple website host that'll easily let me format and post images, videos, and texts.

Do you have any recommendations?

It sounds like you're wanting to hand-create all your own HTML, and not use something like a Wordpress (or any other CMS) theme? Also, you're wanting to host your own video? If so, props, and this frees up a ton of options! I think that the easiest would be something like old school shared hosting ideally from a huge provider like OVH that I linked just there. Most of these shared hosting offerings sell CPU time that you don't need, and access to PHP and usually a MySQL database. What you're describingn really sounds like this plain simple "website hosting", so this is probably what you want. Most of these have been used for people to either do a Wordpress site, possibly with a custom theme, or do their own little PHP (or similar language) dynamic site.

For static (just plain HTML, JS, CSS) websites, there's also a lot of "static site" hosting options, like https://www.netlify.com/, Github as you mentioned, or setting up Amazon. A lot of the purpose-built static website hosting will have limits that prevent it from being used for video storage, so setting up AWS or another public cloud actually isn't a terrible option for this. Outgoing bandwidth on AWS is expensive though, and a terabyte of bandwidth would cost ~$90-100.

About that video hosting: this is the tricky part, video both takes up a lot of disk, and if you do get a high-traffic month, consumes a lot of bandwidth to serve. People normally dump video on Youtube, Vimeo, or someone else to host. It sounds like you're wanting to use this site as an image and video host to be posted in other places too. Consider what happens if somebody posts one of your videos on Reddit and you get 10,000x normal traffic. I'd actually say that the safest way to set up your own video host is to look for a Virtual Private Server, VPS offering. Unlike all of the options above, this would leave you in charge of taking care of a Linux VM somewhere in the world, which isn't a ton of maintenance but also is still more work and learning that you have to do.

It goes without saying that all of these options take more learning and fuss than Wix or Squarespace. Turnkey website builders are the way to go if you just want something up on the internet, but it sounds like you've already started down the path towards something pretty customized. I hope this helped!

CopperHound
Feb 14, 2012

CarForumPoster posted:

Would wix do what you want?
As somebody working to transition from wix: they push up-sell hard for things that seem trivial. They also don't have an easy option for downgrading plans.

nem
Jan 4, 2003

panel.dev
apnscp: cPanel evolved
Hotel California business model. Easy to get in, nigh impossible to leave. Proprietary platforms are all the rage.

Boba Pearl
Dec 27, 2019

by Athanatos

Rufus Ping posted:

Is there a reason the videos can't go on YouTube or Vimeo

It's not porn or anything like that but it's still not anything I can put on youtube realistically. They've also taken down previous videos before. I have Discord Nitro so I've been hosting my videos and images using that and github.

I do parodies of musicals, and some of the covers and things I use get flagged by youtube's system. I would rather host it myself if I can.

Twerk from Home posted:

About that video hosting: this is the tricky part, video both takes up a lot of disk, and if you do get a high-traffic month, consumes a lot of bandwidth to serve. People normally dump video on Youtube, Vimeo, or someone else to host. It sounds like you're wanting to use this site as an image and video host to be posted in other places too. Consider what happens if somebody posts one of your videos on Reddit and you get 10,000x normal traffic. I'd actually say that the safest way to set up your own video host is to look for a Virtual Private Server, VPS offering. Unlike all of the options above, this would leave you in charge of taking care of a Linux VM somewhere in the world, which isn't a ton of maintenance but also is still more work and learning that you have to do.

I think this might be the best idea, do you have anything you'd recommend?

Boba Pearl fucked around with this message at 02:39 on Mar 20, 2021

Impotence
Nov 8, 2010
Lipstick Apathy

Boba Pearl posted:

I have Discord Nitro so I've been hosting my videos and images using that and github.

This will get your Discord account killed.

How much disk space do you use?

Boba Pearl
Dec 27, 2019

by Athanatos

Biowarfare posted:

This will get your Discord account killed.

How much disk space do you use?

I've been doing my stories for a year, and as I've gotten better at art and animation they've grown in size. My first story was 60 mb from beginning to end. While the latest 3 stories doing half a gig a piece. I'm using 2 gigs right now, but I see that bloating up as I do more.

Impotence
Nov 8, 2010
Lipstick Apathy
Honestly that's almost no space used, and if it's legitimately parodies and you own the legal rights to it, I don't see an issue
several gigs is absolutely not 'move to a VPS' world or 'AWS' world

quote:

just a simple website host that'll easily let me format and post images, videos, and texts.
does this imply you are looking for a website creator software or equivalent too?

Impotence fucked around with this message at 11:00 on Mar 20, 2021

Boba Pearl
Dec 27, 2019

by Athanatos
No I have adobe dreamweaver, so I'll make my own stuff. Unless a website maker is really good? I don't really know much about them, but I made a website in High School? Like they made me use linux and everything, but that was 12 years ago.

I just mean, if a file is too big for Github they won't let you embed it. So when I create a page to host my stories, I would want to be able to embed my images and videos in the page.

I write my posts into Google Docs, which has BBCode output for the forums, and HTML output for the webpages.

Boba Pearl fucked around with this message at 11:07 on Mar 20, 2021

xtal
Jan 9, 2011

by Fluffdaddy
I suggest using a host that measures bandwidth in terms of throughout rather than allowed data transfer. For video and images this is a great idea since you won't risk breaching the limit and having overage fees. I would also consider using a seed box type host, such as feralhosting.com.

xtal fucked around with this message at 13:36 on Mar 20, 2021

Boba Pearl
Dec 27, 2019

by Athanatos
Wait I can use a seedbox as a website? I have one of those. Mine is with seedit4me.

xtal
Jan 9, 2011

by Fluffdaddy

Boba Pearl posted:

Wait I can use a seedbox as a website? I have one of those. Mine is with seedit4me.

Check the terms of service. With that host they specifically say "Customers may not use the public HTTP part of their account ... to share any kind of files with the public". The hosts that forbid public trackers are likely to also have that rule.

Boba Pearl
Dec 27, 2019

by Athanatos
Yeah but I wouldn't mind switching, I could just go with feral for my seedbox and then setup a domain and point it at that?

Impotence
Nov 8, 2010
Lipstick Apathy
I still think that's overkill, and all your needs are basically met with a $2/m dreamhost account

Boba Pearl
Dec 27, 2019

by Athanatos
Well, I've been thinking of switching off my seedbox anyways, so switching to one that lets me host my own website might be overkill, but if they charge less, or the same as my current seedbox, then it doesn't feel like I'm spending anymore money, but Dreamhost looks cool too, it's 5$ a month which is nice.

Comatoast
Aug 1, 2003

by Fluffdaddy
I've got a 512mb-ram Buyvm VPS with 256gb of additional storage for $3.25 a month. I would recommend them.

Comatoast fucked around with this message at 15:54 on Mar 22, 2021

frogbs
May 5, 2004
Well well well

frogbs posted:

Thanks for the help everyone! I did also see some reccomendations for Traefik out there for accomplishing the same thing. Anyone used it before? This was a guide I found: https://www.digitalocean.com/community/tutorials/how-to-use-traefik-v2-as-a-reverse-proxy-for-docker-containers-on-ubuntu-20-04

Of everything I tried , so far Traefik has been the most elegant solution for HTTPS on docker-compose. Once you get the label syntax right it prettymuch works immediately.

One thing that i've found increasingly frustrating though is just getting the formatting of docker-compose files correct. Each version is different, and it's surprisingly strict (no tab's, spacing/indents have to be exact). After looking at similar criticisms I've found a lot of people saying docker-compose "isn't good" and "shouldn't be used in production". So...what's the point of it then? Should I be using Swarm or Kubernetes?

Impotence
Nov 8, 2010
Lipstick Apathy

frogbs posted:

(no tab's, spacing/indents have to be exact)


Isn't this basically all YAML, because spacing/indents have value and aren't just for looks? Your kubernetes deployment file will be equally strict.

frogbs
May 5, 2004
Well well well

Biowarfare posted:

Isn't this basically all YAML, because spacing/indents have value and aren't just for looks? Your kubernetes deployment file will be equally strict.

Yeah, it's a YAML thing. I think I figured out what part of my problem is, the editor i'm using is automatically turning 4 spaces into tabs, so as i've been copying and pasting stuff it's been replacing spaces every single time.

frogbs
May 5, 2004
Well well well
I'm helping a client launch a new website, but they want to keep hosting their email through cPanel at HostGator (...I know). I tried just changing the main A Record in their DNS to point to the new website, but it looks like cPanel is configured to use the main domain name (websitedomain.com) as the MX Record automatically. It also doesn't let me enter the cPanel server IP as the main MX Record, it only accepts fully qualified domain names. I tried adding an 'email.websitedomain.com' A Record and changing the MX Record to that, but that immediately broke things, probably because cPanel doesn't know to accept mail at email.websitedomain.com. cPanel also has some other 'email routing' options in the area where you can edit MX records, but i'm not sure they'll help at all:



Does anyone who's more familiar with cPanel know if there's a way to point the main A Record to the new website, but leave the MX Record pointing to the cPanel install?

Impotence
Nov 8, 2010
Lipstick Apathy
run your own dns

frogbs
May 5, 2004
Well well well

Biowarfare posted:

run your own dns

I did think about that, but I think the only way it'd work is if the DNS I run (or maybe their registrar's) would let me put an IP address for the MX record. I suppose it's worth a shot.

Rufus Ping
Dec 27, 2006





I'm a Friend of Rodney Nano
That's a spec violation and isn't the solution

Impotence
Nov 8, 2010
Lipstick Apathy

frogbs posted:

I did think about that, but I think the only way it'd work is if the DNS I run (or maybe their registrar's) would let me put an IP address for the MX record. I suppose it's worth a shot.

Why? Just make an A record and set the MX to that

Ffycchi
Jun 4, 2014

Sigh...challenge accepted...shitty photoshop incoming.

DarkLotus posted:

No worries, all I ever see here and on /r/webhosting is "AWS AWS AWS AWS AWS and VPS" when people just want to host Wordpress and have it work. It gets frustrating.

I officially run ApisCP on all of my shared hosting and have for well over a year. If you could do it at Hostineer, you can do it at Lithium now.
Short answer, yes, you can run a store without issue but it's on you to develop and implement :)

Is there a new SA tier on lithium? Mine has been listed as retired since like 2016 hah.

DarkLotus
Sep 30, 2001

Lithium Hosting
Personal, Reseller & VPS Hosting
30-day no risk Free Trial &
90-days Money Back Guarantee!

Ffycchi posted:

Is there a new SA tier on lithium? Mine has been listed as retired since like 2016 hah.

No more SA tiers, keep your retired plan forever though, it just means it can't be purchased anymore!

Adbot
ADBOT LOVES YOU

Ffycchi
Jun 4, 2014

Sigh...challenge accepted...shitty photoshop incoming.

DarkLotus posted:

No more SA tiers, keep your retired plan forever though, it just means it can't be purchased anymore!

Aw that's sad. I enjoyed the cheeky sekrit website for SA members.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply