Browse Source

initial commit

Josh Bicking 6 years ago
commit
4041d0d12d
3 changed files with 209 additions and 0 deletions
  1. 2 0
      .gitignore
  2. 206 0
      docker-compose.yaml
  3. 1 0
      max_body_size.conf

+ 2 - 0
.gitignore

@@ -0,0 +1,2 @@
+htpasswd
+.env

+ 206 - 0
docker-compose.yaml

@@ -0,0 +1,206 @@
+version: '2'
+
+services:
+  nginx-proxy:
+    image: jwilder/nginx-proxy
+    ports:
+      - "80:80"
+      - "443:443"
+    volumes:
+      - /var/run/docker.sock:/tmp/docker.sock:ro
+      - /etc/letsencrypt:/etc/nginx/certs:ro
+      - ./max_body_size.conf:/etc/nginx/conf.d/max_body_size.conf:ro
+      - ./htpasswd:/etc/nginx/htpasswd
+    environment:
+      - DEFAULT_HOST=jossh.us
+    restart: always
+
+  letsencrypt-nginx-proxy-companion:
+    image: jrcs/letsencrypt-nginx-proxy-companion
+    volumes:
+      - /etc/letsencrypt:/etc/nginx/certs:rw
+      - /var/run/docker.sock:/var/run/docker.sock:ro
+    volumes_from:
+      - nginx-proxy
+    restart: always
+
+  postgres:
+    image: postgres
+    restart: always
+    volumes:
+      - ${CONTAINERS_DIR}/postgres/data:/var/lib/postgresql/data
+      - ${CONTAINERS_DIR}/postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
+    environment:
+      - POSTGRES_USER=${POSTGRES_USER}
+      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
+
+  mariadb:
+    image: mariadb
+    restart: always
+    volumes:
+      - ${CONTAINERS_DIR}/mariadb:/var/lib/mysql
+    environment:
+      # If mariadb is used for more than wordpress in the future, it'll need its own /docker-entrypoint-initdb.d entry. But for now, envrionment variables are fine.
+      - MYSQL_DATABASE=wordpress
+      - MYSQL_USER=${MARIADB_USER}
+      - MYSQL_PASSWORD=${MARIADB_PASSWORD}
+      - MYSQL_ROOT_PASSWORD=${MARIADB_PASSWORD}
+
+  wordpress:
+    image: wordpress
+    links:
+        - mariadb:mysql
+    restart: always
+    volumes:
+      - ${CONTAINERS_DIR}/wordpress:/var/www/html
+    environment:
+      - WORDPRESS_DB_USER=${MARIADB_USER}
+      - WORDPRESS_DB_PASSWORD=${MARIADB_PASSWORD}
+      - VIRTUAL_HOST=josh1147582.jumpingcrab.com,jossh.us
+      - LETSENCRYPT_HOST=josh1147582.jumpingcrab.com,jossh.us
+      - VIRTUAL_PORT=3000
+      - LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
+
+  nextcloud:  
+    image: nextcloud
+    expose:
+      - "80"
+    links:
+      - postgres
+    volumes:
+      - ${CONTAINERS_DIR}/nextcloud:/var/www/html
+    environment:
+      - VIRTUAL_HOST=nextcloud.josh1147582.jumpingcrab.com,nextcloud.jossh.us
+      - VIRTUAL_PORT=80
+      - LETSENCRYPT_HOST=nextcloud.josh1147582.jumpingcrab.com,nextcloud.jossh.us
+      - LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
+    restart: always
+
+  gogs:  
+    image: gogs/gogs
+    expose:
+      - "3000"
+    volumes:
+      - ${CONTAINERS_DIR}/gogs:/data
+    #links:
+    #  - postgres
+    environment:
+      - VIRTUAL_HOST=gogs.josh1147582.jumpingcrab.com,gogs.jossh.us
+      - LETSENCRYPT_HOST=gogs.josh1147582.jumpingcrab.com,gogs.jossh.us
+      - VIRTUAL_PORT=3000
+      - LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
+    restart: always
+
+  # Matrix doesn't play well with reverse proxying. See:
+  # https://github.com/matrix-org/synapse#reverse-proxying-the-federation-port
+  # https://github.com/vector-im/riot-web/issues/3329
+  # So this container isn't proxied, but uses the postgres container.
+  matrix:
+    image: avhost/docker-matrix
+    expose:
+      - "8008"
+      - "8448"
+      - "3478"
+    ports:
+      - "8008:8008"
+      - "8448:8448"
+      - "3478:3478"
+    links:
+      - postgres
+    volumes:
+      - ${CONTAINERS_DIR}/matrix:/data
+      - /etc/letsencrypt/josh1147582.jumpingcrab.com/:/keys
+    restart: always
+
+  keeweb:
+    image: antelle/keeweb
+    expose:
+      - "443"
+    environment:
+      - VIRTUAL_HOST=keeweb.jossh.us
+      - LETSENCRYPT_HOST=keeweb.jossh.us
+      - VIRTUAL_PROTO=https
+      - VIRTUAL_PORT=443
+      - LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
+
+  libresonic:
+    image: linuxserver/libresonic
+    expose:
+      - "4040"
+    volumes:
+      - ${CONTAINERS_DIR}/libresonic:/config
+      - ${MEDIA_DIR}/Music:/music
+    environment:
+      - VIRTUAL_HOST=libresonic.josh1147582.jumpingcrab.com,libresonic.jossh.us
+      - LETSENCRYPT_HOST=libresonic.josh1147582.jumpingcrab.com,libresonic.jossh.us
+      - VIRTUAL_PORT=4040
+      - LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
+      - TZ=America/New_York
+    restart: always
+
+  quassel:
+    image: linuxserver/quassel-core
+    expose:
+      - "4242"
+    ports:
+      - "4242:4242"
+    volumes:
+      - ${CONTAINERS_DIR}/quassel:/config
+      - /etc/localtime:/etc/localtime:ro
+    environment:
+      - PGID=1000
+      - PUID=1000
+    restart: always
+
+  netdata:
+    image: firehol/netdata
+    privileged: true
+    #cap_add:
+    #  - SYS_PTRACE
+    expose:
+      - "19999"
+    volumes:
+      - /proc:/host/proc:ro
+      - /sys:/host/sys:ro
+    environment:
+      - VIRTUAL_HOST=netdata.jossh.us
+      - LETSENCRYPT_HOST=netdata.jossh.us
+      - VIRTUAL_PORT=19999
+      - LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
+    restart: always
+
+  # Currently unused container configs:
+
+  #znc:
+  #  image: znc
+  #  expose:
+  #    - "6697"
+  #  ports:
+  #    - "6697:6697"
+  #  volumes:
+  #    - ${CONTAINERS_DIR}/znc:/home/znc/.znc
+  #  environment:
+  #    - VIRTUAL_HOST=znc.jossh.us
+  #    - LETSENCRYPT_HOST=znc.jossh.us
+  #    - VIRTUAL_PORT=6697
+  #    - VIRTUAL_PROTO=https
+  #    - LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
+  #  restart: always
+    
+
+  # gitlab:
+  #   image: gitlab/gitlab-ce
+  #   expose:
+  #     - "80"
+  #     - "22"
+  #   # Gitlab destroys databases when seeding them, and requires an admin user for seeding. So let's not link it to the running postgres instance.
+  #   environment:
+  #     - VIRTUAL_HOST=gitlab.jossh.us
+  #     - VIRTUAL_PORT=80
+  #     - LETSENCRYPT_HOST=gitlab.jossh.us
+  #     - LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
+  #   volumes:
+  #     - ${CONTAINERS_DIR}/gitlab/config:/etc/gitlab
+  #     - ${CONTAINERS_DIR}/gitlab/logs:/var/log/gitlab
+  #     - ${CONTAINERS_DIR}/gitlab/data:/var/opt/gitlab
+  #   restart: always

+ 1 - 0
max_body_size.conf

@@ -0,0 +1 @@
+client_max_body_size 16000m;