Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions containers/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
nginx:
version: '3'
services:
nginx:
build: nginx
restart: always
ports:
- "80:80"
- "443:443"
- "85:80"
links:
- fpm
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
fpm:
- fpm
fpm:
build: fpm
restart: always
expose:
- "9000"
- "9000"

4 changes: 2 additions & 2 deletions containers/fpm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM php:7.0-fpm
FROM php:8.2-fpm
MAINTAINER Kenan Rhoton
RUN apt-get update

# Framebuffer to render webpages and some font packages to make them look right
RUN apt-get install -y xvfb ttf-freefont fontconfig dbus
RUN apt-get install -y xvfb fontconfig dbus

# Our html to PDF renderer
RUN apt-get install -y wkhtmltopdf
Expand Down
8 changes: 4 additions & 4 deletions containers/nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM nginx:alpine
MAINTAINER Kenan Rhoton
RUN apk add --no-cache certbot certbot-nginx git go
RUN git clone https://gitlab.redsauce.net/cmd/scheduler /scheduler
RUN apk add --no-cache git go
# RUN git clone https://gitlab.redsauce.net/cmd/scheduler /scheduler
COPY conf/nginx.conf /etc/nginx/nginx.conf
COPY conf/nginx.vh.default.conf /etc/nginx/conf.d/default.conf
COPY letsencrypt-setup.sh /bin/le-setup
CMD /bin/le-setup
# COPY letsencrypt-setup.sh /bin/le-setup
# CMD /bin/le-setup
2 changes: 1 addition & 1 deletion containers/nginx/conf/nginx.vh.default.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
server {
listen 80;
server_name pdf.redsauce.net;
server_name pdf-two.redsauce.net;

#charset koi8-r;
#access_log /var/log/nginx/log/host.access.log main;
Expand Down
13 changes: 7 additions & 6 deletions containers/nginx/letsencrypt-setup.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#!/bin/sh
set -xe

nginx && \
certbot --nginx --non-interactive --agree-tos --email webmaster@redsauce.net --domains pdf.redsauce.net && \
killall nginx
nginx
# && \
# certbot --nginx --non-interactive --agree-tos --email webmaster@redsauce.net --domains pdf.redsauce.net && \
# killall nginx

go run /scheduler/scheduler.go 02:30 certbot renew &
sleep 1
nginx -g "daemon off;"
# go run /scheduler/scheduler.go 02:30 certbot renew &
# sleep 1
# nginx -g "daemon off;"

# echo "certbot renew" > /etc/periodic/daily/cerbot-renewal && \
# chmod +x /etc/periodic/daily/certbot-renewal && \