rename to hackerspace.zone and fix docker hostnames

single-dockerfile
Trammell Hudson 3 years ago
parent e8c251f152
commit d8543b6ba5
  1. 2
      README.md
  2. 12
      env.production
  3. 12
      hedgedoc/docker-compose.yaml
  4. 2
      keycloak/README.md
  5. 1
      keycloak/docker-compose.yaml
  6. 3
      nextcloud/docker-compose.yaml
  7. 4
      nginx/data/nginx/templates/docs.conf.template
  8. 2
      nginx/data/nginx/templates/login.conf.template
  9. 2
      nginx/data/nginx/templates/social.conf.template
  10. 3
      nginx/docker-compose.yaml
  11. 1
      nginx/env.production
  12. 1
      nginx/setup

@ -1,4 +1,4 @@
apt install jq docker-compose
``` ```
cd keycloak cd keycloak

@ -1,7 +1,7 @@
DOMAIN_NAME=example.com DOMAIN_NAME=hackerspace.zone
REALM=spacestation REALM=hackerspace
KEYCLOAK_HOSTNAME=login.example.com KEYCLOAK_HOSTNAME=login.hackerspace.zone
HEDGEDOC_HOSTNAME=docs.example.com HEDGEDOC_HOSTNAME=docs.hackerspace.zone
MASTODON_HOSTNAME=social.example.com MASTODON_HOSTNAME=social.hackerspace.zone
NEXTCLOUD_HOSTNAME=cloud.example.com NEXTCLOUD_HOSTNAME=cloud.hackerspace.zone

@ -9,7 +9,7 @@ services:
volumes: volumes:
- ./data/database:/var/lib/postgresql/data - ./data/database:/var/lib/postgresql/data
restart: always restart: always
app: hedgedoc:
# Make sure to use the latest release from https://hedgedoc.org/latest-release # Make sure to use the latest release from https://hedgedoc.org/latest-release
image: quay.io/hedgedoc/hedgedoc:1.9.3 image: quay.io/hedgedoc/hedgedoc:1.9.3
env_file: env_file:
@ -17,14 +17,14 @@ services:
- env.production - env.production
environment: environment:
- CMD_DB_URL=postgres://hedgedoc:password@database:5432/hedgedoc - CMD_DB_URL=postgres://hedgedoc:password@database:5432/hedgedoc
- CMD_DOMAIN=docs.example.com - CMD_PROTOCOL_USESSL=true
#- CMD_URL_ADDPORT=true - CMD_DOMAIN=docs.hackerspace.zone
- CMD_OAUTH2_USER_PROFILE_URL=https://login.example.com/realms/spacestation/protocol/openid-connect/userinfo - CMD_OAUTH2_AUTHORIZATION_URL=https://login.hackerspace.zone/realms/hackerspace/protocol/openid-connect/auth
- CMD_OAUTH2_TOKEN_URL=https://login.hackerspace.zone/realms/hackerspace/protocol/openid-connect/token
- CMD_OAUTH2_USER_PROFILE_URL=https://login.hackerspace.zone/realms/hackerspace/protocol/openid-connect/userinfo
- CMD_OAUTH2_USER_PROFILE_USERNAME_ATTR=preferred_username - CMD_OAUTH2_USER_PROFILE_USERNAME_ATTR=preferred_username
- CMD_OAUTH2_USER_PROFILE_DISPLAY_NAME_ATTR=name - CMD_OAUTH2_USER_PROFILE_DISPLAY_NAME_ATTR=name
- CMD_OAUTH2_USER_PROFILE_EMAIL_ATTR=email - CMD_OAUTH2_USER_PROFILE_EMAIL_ATTR=email
- CMD_OAUTH2_TOKEN_URL=https://login.example.com/realms/spacestation/protocol/openid-connect/token
- CMD_OAUTH2_AUTHORIZATION_URL=https://login.example.com/realms/spacestation/protocol/openid-connect/auth
- CMD_OAUTH2_CLIENT_ID=hedgedoc - CMD_OAUTH2_CLIENT_ID=hedgedoc
- CMD_OAUTH2_PROVIDERNAME=Keycloak - CMD_OAUTH2_PROVIDERNAME=Keycloak
volumes: volumes:

@ -66,7 +66,7 @@ sudo docker-compose exec -T keycloak \
-r spacestation \ -r spacestation \
-f - <<EOF -f - <<EOF
{ {
"clientId": "hedgerow", "clientId": "hedgedoc",
"rootUrl": "http://spacestation:3000/", "rootUrl": "http://spacestation:3000/",
"adminUrl": "http://spacestation:3000/", "adminUrl": "http://spacestation:3000/",
"redirectUris": [ "http://spacestation:3000/*" ], "redirectUris": [ "http://spacestation:3000/*" ],

@ -33,6 +33,5 @@ services:
- ./data/certs:/etc/x509/https - ./data/certs:/etc/x509/https
ports: ports:
- 8080:8080 - 8080:8080
- 8443:8443
depends_on: depends_on:
- mysql - mysql

@ -25,8 +25,9 @@ services:
POSTGRES_USER: nextcloud POSTGRES_USER: nextcloud
POSTGRES_PASSWORD: nextcloud POSTGRES_PASSWORD: nextcloud
#NEXTCLOUD_TRUSTED_DOMAINS: "${NEXTCLOUD_HOSTNAME}" #NEXTCLOUD_TRUSTED_DOMAINS: "${NEXTCLOUD_HOSTNAME}"
NEXTCLOUD_TRUSTED_DOMAINS: cloud.example.com NEXTCLOUD_TRUSTED_DOMAINS: cloud.hackerspace.zone
NEXTCLOUD_ADMIN_USER: admin NEXTCLOUD_ADMIN_USER: admin
OVERWRITEPROTOCOL: https
volumes: volumes:
- ./data/nextcloud:/var/www/html - ./data/nextcloud:/var/www/html
depends_on: depends_on:

@ -32,7 +32,7 @@ server {
chunked_transfer_encoding on; chunked_transfer_encoding on;
location / { location / {
proxy_pass http://spacestation:3000; proxy_pass http://host.docker.internal:3000;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@ -40,7 +40,7 @@ server {
} }
location /socket.io/ { location /socket.io/ {
proxy_pass http://spacestation:3000; proxy_pass http://host.docker.internal:3000;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

@ -11,7 +11,7 @@ server {
client_max_body_size 128m; client_max_body_size 128m;
location / { location / {
proxy_pass http://spacestation:8080; proxy_pass http://host.docker.internal:8080;
proxy_pass_header Set-Cookie; proxy_pass_header Set-Cookie;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $remote_addr;

@ -11,7 +11,7 @@ server {
client_max_body_size 128m; client_max_body_size 128m;
location / { location / {
proxy_pass http://spacestation:6001; proxy_pass http://host.docker.internal:6001;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto https; proxy_set_header X-Forwarded-Proto https;

@ -14,6 +14,9 @@ services:
env_file: env_file:
- ../env.production - ../env.production
- env.production - env.production
extra_hosts:
- "host.docker.internal:host-gateway"
certbot: certbot:
image: certbot/certbot image: certbot/certbot
volumes: volumes:

@ -1 +0,0 @@
DOMAIN_NAME=example.com

@ -6,6 +6,7 @@ if [ ! -r "$ENV" ]; then
die "$ENV: not found?" die "$ENV: not found?"
fi fi
source ../env.production
source env.production source env.production
if [ -z "${DOMAIN_NAME}" ]; then if [ -z "${DOMAIN_NAME}" ]; then

Loading…
Cancel
Save