diff --git a/.env.example b/.env.example index fdf6057..48b4074 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,8 @@ PROJECT_ROOT="" CONTAINER_NAME="pf" DOMAIN="" +# Emails from Let's Encrypt about your certificate will go here +LE_EMAIL="" APP_PASSWORD="" MYSQL_PASSWORD="" CCP_SSO_CLIENT_ID="" diff --git a/Dockerfile b/Dockerfile index dc27a2f..a4670ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,10 @@ FROM trafex/alpine-nginx-php7:ba1dd422 RUN apk update && apk add --no-cache busybox-suid sudo php7-redis php7-pdo php7-pdo_mysql php7-fileinfo shadow gettext bash apache2-utils logrotate +# symlink nginx logs to stdout/stderr for supervisord +RUN ln -sf /dev/stdout /var/log/nginx/access.log \ + && ln -sf /dev/stderr /var/log/nginx/error.log + COPY static/logrotate/pathfinder /etc/logrotate.d/pathfinder COPY static/nginx/nginx.conf /etc/nginx/templateNginx.conf # we need to create sites_enabled directory in order for entrypoint.sh being able to copy file after envsubst diff --git a/README.md b/README.md index d53f69f..34b0292 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ A fork of techfreak's [Pathfinder-container](https://gitlab.com/techfreak/pathfi docker-compose exec pfdb /bin/sh -c "unzip -p eve_universe.sql.zip | mysql -u root -p\$MYSQL_ROOT_PASSWORD eve_universe"; 1. **When everthing works, configure Traefik correctly for production** - * Remove the beta CA server lines [(#87 - #90)](https://github.com/goryn-clade/pathfinder-containers/blob/master/docker-compose.yml#L87-L90) from `docker-compose.yml`. + * Remove the staging CA server line [(#89)](https://github.com/goryn-clade/pathfinder-containers/blob/master/docker-compose.yml#L89) from `docker-compose.yml`. * Delete the `./letsencrypt/acme.json` configuration file so Let's Encrypt will get a new certificate.

* If you are not the root user on your host you may need to edit file permissions. Docker-engine creates the `letsencrypt` director as root user, which means that you would need to prefix `sudo` on any future docker commands (`sudo docker-compose up` etc). To avoid doing this you can take ownership of the letsencrypt directory by running `sudo chown -R $USER ./letsencrypt`. diff --git a/docker-compose.yml b/docker-compose.yml index 9b8245b..45ba581 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -89,7 +89,7 @@ services: - "--certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json" # Remove below line when ready for production - "--certificatesresolvers.letsencrypt.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory" - - "--certificatesresolvers.letsencrypt.acme.email=MYEMAIL@someemailprobablygmail.com" + - "--certificatesresolvers.letsencrypt.acme.email=${LE_EMAIL}" ports: - "80:80" - "443:443"