Coder Social home page Coder Social logo

rsoper / richardsoper.me Goto Github PK

View Code? Open in Web Editor NEW
47.0 47.0 3.0 245 KB

My Traefik V2 stack.

Home Page: https://www.richardsoper.me

Ruby 100.00%
arm64 cloudflare docker docker-compose docker-swarm grafana radarr sonarr swarm traefik traefik-configurations traefik-docker traefik-v2

richardsoper.me's People

Contributors

rsoper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

richardsoper.me's Issues

Current issues:

Running

docker-compose up -d

  • fails as ghost.env does not exist in /ghost/. I pointed it to the example.env

  • HTTPS does not currently work (or I am doing something wrong!). Navigating all all of the sites throws up the chrome/firefox warning about HTTP/S

  • Traefik.URL phpmyadmin.URL and nextcloud.URL all fail. as 404 page not found.

MYSQL and Nextcloud

Just an update here--after a bunch of banging my head on this issue, nextcloud repeatedly fails I had a friend familiar with networks and MYSQL (day job as a programmer however) screenshare with me and we both threw lots of stuff at it to no avail.

when I go to set up nextcloud I use USERNAME/PASSWORD, and then

Data Folder: /var/www/html/data
Database User: nextcloud
DB Password = same password that's in MYSQL_PASSWORD: $$AREALPASSWORD and MYSQL_ROOT_PASSWORD: $$AREALPASSWORD (same for right now while I bug test)

I still get

SQLSTATE[HY000] [1045] Access denied for user 'nextcloud'@'nextcloud.traefik_proxy' (using password: YES)

What i've tried:

  • Getting on PHPMyAdmin and dropping the NextCloud Table and recreating it.
  • I rebuilt it using "MYSQL_HOST=mariadb:3306"
  • I've spent 3 hours trying variations on changing the passwords, docker-compose up and down and still getting the same error.
  • I tried making a mariadbuser who only used nextcloud.traefik_proxy

I'm self taught but I believe if nextcloud can't connect to your database it will fail to open and you can't log in. When I set up nextcloud I enter "mariadb:3306" and docker networking will direct it to the correct container. Some advice I have seen has said to just put mariadb in, which I've also done to no avail.

Here are my config bits for nextcloud and mariaDB

  # Nextcloud - Personal cloud storage system

  nextcloud:
    container_name: nextcloud
    image: nextcloud:latest
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: $$AREALPASSWORD
      MYSQL_USER: nextcloud
      MYSQL_PASSWORD: $$AREALPASSWORD
      MYSQL_DATABASE: nextcloud
      MYSQL_HOST: mariadb
    env_file:
      - /home/$$USERNAME/Docker/example.env
    depends_on:
      - mariadb
    ports:
      - "8000:80"
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.nextcloud.entrypoints=http"
      - "traefik.http.routers.nextcloud.rule=Host(`cloud.$me.ME`)"
      - "traefik.http.middlewares.nextcloud-https-redirect.redirectscheme.scheme=https"
      - "traefik.http.routers.nextcloud.middlewares=nextcloud-https-redirect"
      - "traefik.http.routers.nextcloud-secure.entrypoints=https"
      - "traefik.http.routers.nextcloud-secure.rule=Host(`cloud.$me.ME`)"
      - "traefik.http.routers.nextcloud-secure.tls=true"
      - "traefik.http.routers.nextcloud-secure.tls.certresolver=cf-cert"
      - "traefik.http.routers.nextcloud-secure.service=nextcloud"
      - "traefik.http.middlewares.nextcloud-secure.headers.customFrameOptionsValue=SAMEORIGIN"
      - "traefik.http.middlewares.nextcloud-secure.headers.framedeny=true"
      - "traefik.http.middlewares.nextcloud-secure.headers.sslredirect=true"
      - "traefik.http.middlewares.nextcloud-secure.headers.stsIncludeSubdomains=true"
      - "traefik.http.middlewares.nextcloud-secure.headers.stsPreload=true"
      - "traefik.http.middlewares.nextcloud-secure.headers.stsSeconds=15552000"
      - "traefik.http.middlewares.nextcloud.headers.customFrameOptionsValue=SAMEORIGIN"
      - "traefik.http.middlewares.nextcloud.headers.framedeny=true"
      - "traefik.http.middlewares.nextcloud.headers.sslredirect=true"
      - "traefik.http.middlewares.nextcloud.headers.stsIncludeSubdomains=true"
      - "traefik.http.middlewares.nextcloud.headers.stsPreload=true"
      - "traefik.http.middlewares.nextcloud.headers.stsSeconds=15552000"
      - "traefik.http.services.nextcloud.loadbalancer.server.port=80"
      - "traefik.docker.network=traefik_proxy"
    volumes:
      - /home/$$USERNAME/Docker/nextcloud:/var/www/html
    networks:
      - traefik_proxy

  # MariaDB - SQL based database for most of this stack.

  mariadb:
    container_name: mariadb
    hostname: mariadb
    image: linuxserver/mariadb
    restart: always
    env_file:
      - /home/$$USERNAME/Docker/example.env
    volumes:
      - /home/$$USERNAME/Docker/mariadb:/config
      - /home/$$USERNAME/Docker/shared:/shared
    environment:
      - MYSQL_ROOT_PASSWORD=$$AREALPASSWORD
      - TZ="America/New_York"
    networks:
      - traefik_proxy

env file

# Directory level authentication
HTTP_USERNAME=myusername
HTTP_PASSWORD=passwordy$$

# My domain name
DOMAINNAME=$me.ME

# Cloudflare DNS authentication
[email protected]
CLOUDFLARE_API_KEY=$$REAL API

# Time Zone
TZ="America/New_York"

# Docker directory
DOCKERDIR=/home/$$USERNAME/Docker

# Database passwords
MYSQL_ROOT_PASSWORD=$$MYPASSWORD
WORDPRESSPW=$$MYPASSWORD

# Server IP
SERVER_IP=IP.ADDY.234234234

When I run docker-compose up and look at the logs nextcloud spits this out each time I fail to login:


nextcloud     | 172.19.0.2 - - [08/Feb/2020:23:48:46 +0000] "GET /data/htaccesstest.txt HTTP/1.1" 500 807 "-" "Nextcloud Server Crawler"
nextcloud     | [Sat Feb 08 23:48:46.323607 2020] [core:alert] [pid 417] [client 172.19.0.2:42790] /var/www/html/data/.htaccess: Expected </IifModule> but saw </IfModule>
nextcloud     | [Sat Feb 08 23:48:46.488266 2020] [core:alert] [pid 31] [client 172.19.0.2:42794] /var/www/html/data/.htaccess: Expected </IifModule> but saw </IfModule>
nextcloud     | 172.19.0.2 - - [08/Feb/2020:23:48:46 +0000] "GET /data/htaccesstest.txt HTTP/1.1" 500 807 "-" "Nextcloud Server Crawler"
nextcloud     | 172.19.0.2 - - [08/Feb/2020:23:48:45 +0000] "POST /index.php HTTP/1.1" 200 3630 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36"
nextcloud     | 172.19.0.2 - - [08/Feb/2020:23:49:12 +0000] "GET /data/htaccesstest.txt HTTP/1.1" 500 807 "-" "Nextcloud Server Crawler"
nextcloud     | [Sat Feb 08 23:49:12.113201 2020] [core:alert] [pid 28] [client 172.19.0.2:42806] /var/www/html/data/.htaccess: Expected </IifModule> but saw </IfModule>
nextcloud     | [Sat Feb 08 23:49:12.290454 2020] [core:alert] [pid 32] [client 172.19.0.2:42810] /var/www/html/data/.htaccess: Expected </IifModule> but saw </IfModule>
nextcloud     | 172.19.0.2 - - [08/Feb/2020:23:49:12 +0000] "GET /data/htaccesstest.txt HTTP/1.1" 500 807 "-" "Nextcloud Server Crawler"
nextcloud     | 172.19.0.2 - - [08/Feb/2020:23:49:11 +0000] "POST /index.php HTTP/1.1" 200 3632 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36"
nextcloud     | [Sat Feb 08 23:56:46.645678 2020] [core:alert] [pid 416] [client 172.19.0.2:42846] /var/www/html/data/.htaccess: Expected </IifModule> but saw </IfModule>
nextcloud     | 172.19.0.2 - - [08/Feb/2020:23:56:46 +0000] "GET /data/htaccesstest.txt HTTP/1.1" 500 807 "-" "Nextcloud Server Crawler"
nextcloud     | [Sat Feb 08 23:56:46.762260 2020] [core:alert] [pid 29] [client 172.19.0.2:42850] /var/www/html/data/.htaccess: Expected </IifModule> but saw </IfModule>
nextcloud     | 172.19.0.2 - - [08/Feb/2020:23:56:46 +0000] "GET /data/htaccesstest.txt HTTP/1.1" 500 807 "-" "Nextcloud Server Crawler"
nextcloud     | 172.19.0.2 - - [08/Feb/2020:23:56:46 +0000] "GET / HTTP/1.1" 200 2704 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36"
nextcloud     | [Sat Feb 08 23:59:07.477249 2020] [core:alert] [pid 417] [client 172.19.0.2:42872] /var/www/html/data/.htaccess: Expected </IifModule> but saw </IfModule>
nextcloud     | 172.19.0.2 - - [08/Feb/2020:23:59:07 +0000] "GET /data/htaccesstest.txt HTTP/1.1" 500 807 "-" "Nextcloud Server Crawler"
nextcloud     | [Sat Feb 08 23:59:07.612137 2020] [core:alert] [pid 31] [client 172.19.0.2:42876] /var/www/html/data/.htaccess: Expected </IifModule> but saw </IfModule>
nextcloud     | 172.19.0.2 - - [08/Feb/2020:23:59:07 +0000] "GET /data/htaccesstest.txt HTTP/1.1" 500 807 "-" "Nextcloud Server Crawler"
nextcloud     | 172.19.0.2 - - [08/Feb/2020:23:59:07 +0000] "GET /index.php/csrftoken HTTP/1.1" 200 2702 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0"
nextcloud     | [Sun Feb 09 00:02:12.207587 2020] [core:alert] [pid 28] [client 172.19.0.2:42900] /var/www/html/data/.htaccess: Expected </IifModule> but saw </IfModule>
nextcloud     | 172.19.0.2 - - [09/Feb/2020:00:02:12 +0000] "GET /data/htaccesstest.txt HTTP/1.1" 500 807 "-" "Nextcloud Server Crawler"
nextcloud     | 172.19.0.2 - - [09/Feb/2020:00:02:12 +0000] "GET /data/htaccesstest.txt HTTP/1.1" 500 807 "-" "Nextcloud Server Crawler"
nextcloud     | [Sun Feb 09 00:02:12.309546 2020] [core:alert] [pid 32] [client 172.19.0.2:42904] /var/www/html/data/.htaccess: Expected </IifModule> but saw </IfModule>
nextcloud     | 172.19.0.2 - - [09/Feb/2020:00:02:11 +0000] "GET /index.php/csrftoken HTTP/1.1" 200 2702 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.