forked from sebt3/hubzilla
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b81facb
commit 17adb1a
Showing
15 changed files
with
575 additions
and
300 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
.git | ||
install/* | ||
*.md | ||
.drone | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
### ## ## ## ## ## ## ## ## ## ## ### | ||
## /`` /``\ |\ | |``` | /``` ## | ||
## | | | | \ | |``` | | --| ## | ||
## \__ \__/ | \| | | \___/ ## | ||
### ## ## ## ## ## ## ## ## ## ## ### | ||
|
||
## ## ## ## ## ## ## ## ## ## | ||
# Build Vars. Do not change # | ||
VER_FULL=10.0.6 | ||
VER_MAJOR=10 | ||
|
||
## Replace variables below with the required settings ## | ||
## DO NOT use quotes | ||
|
||
## ## ## ## ## ## ## ## ## ## | ||
# Hubzilla/Site config # | ||
# | ||
# NOTES: | ||
# REGISTER_POLICY: options are REGISTER_OPEN, REGISTER_APPROVE, OR REGISTER_CLOSED | ||
DOMAIN=domain.com | ||
SITE_NAME=My Cool Site | ||
ADMIN_EMAIL=example@gmail.com | ||
TIMEZONE=Etc/UTC | ||
REQUIRE_EMAIL=1 | ||
REGISTER_POLICY=REGISTER_OPEN | ||
ADDON_LIST=logrot nsfw superblock diaspora pubcrawl | ||
|
||
## ## ## ## ## ## ## ## ## ## | ||
# NGINX config # | ||
# | ||
# NOTES: | ||
# LOC_NGINXCONF: location of the NGINX conf FILE, by default it's in the config folder, located where the docker-compose file is. | ||
LOC_NGINXCONF=./config/nginx.conf | ||
|
||
|
||
## ## ## ## ## ## ## ## ## ## | ||
# Database config # | ||
# | ||
# NOTES: | ||
# LOC_DB: location of the FOLDER, where the database should reside (locally, network mount, etc.., it can get fairly large, so make sure you have enough room) | ||
# DB_HOST: needs to be the name/heading (not container name) of the database container (see docker-compose.yml) | ||
# DB_TYPE Options: postgres or mariadb | ||
|
||
## ## ## ## ## | ||
# DB Agnostic | ||
LOC_DB=./db | ||
DB_HOST=hub_db | ||
DB_NAME=hub | ||
DB_USER=hubzilla | ||
DB_PASSWORD=P@55w0rD | ||
|
||
## ## ## ## ## | ||
# MariaDB/MySQL | ||
#DB_TYPE=mariadb | ||
#DB_PORT=3306 | ||
|
||
## ## ## ## ## | ||
# Postgres | ||
DB_TYPE=postgres | ||
DB_PORT=5432 | ||
|
||
## ## ## ## ## ## ## ## ## ## | ||
# SMTP Config # | ||
# | ||
# NOTES: | ||
# If using a personal gmail account for smtp and | ||
# 2-factor authentication is enabled, you need to | ||
# create an app password and use for SMTP_PASS | ||
# https://support.google.com/accounts/answer/185833?hl=en | ||
SMTP_HOST=smtp.gmail.com | ||
SMTP_PORT=465 | ||
SMTP_DOMAIN=localhost | ||
SMTP_USER=example@gmail.com | ||
SMTP_PASS=P@55w0rD | ||
SMTP_USE_STARTTLS=YES | ||
|
||
## ## ## ## ## ## ## ## ## ## | ||
# Logging # | ||
# | ||
# NOTES: | ||
# LOGROT_SIZE = size in bytes | ||
ENABLE_LOGROT=0 | ||
LOGROT_PATH=log | ||
LOGROT_SIZE=5242880 | ||
LOGROT_MAXFILES=20 | ||
|
||
## ## ## ## ## ## ## ## ## ## | ||
# Debug # | ||
DEBUG_PHP=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Hubzilla Docker image | ||
[Hubzilla](https://framagit.org/hubzilla/core) as a [docker image](https://hub.docker.com/r/dhitchenor/hubzilla) (based on php:8.2-fpm-alpine) in a multi-arch (amd64, armv6/7, arm64) format. | ||
|
||
# Features | ||
- Automatic setup | ||
- Integral addons, preinstalled | ||
- env file for easy configuration/toggling of features | ||
|
||
## Supported environment variables: | ||
| Variable | Description | | ||
|---------------------|--------------------------------------------------------------------------------------------------------------------------------------| | ||
| DB_TYPE | Database type: postgres or mysql | | ||
| DB_HOST | Host name of the database | | ||
| DB_PORT | Database port number, set to empty to use the default of your DB_TYPE (aka 3306 for mysql) | | ||
| DB_NAME | Database name | | ||
| DB_USER | Database user | | ||
| DB_PASSWORD | Database user password | | ||
| REQUIRE_EMAIL | Require email address to register | | ||
| REGISTER_POLICY | Allow (or disallow) new user registrations | | ||
| SMTP_HOST | Mail server hostname | | ||
| SMTP_PORT | Mail server port number | | ||
| SMTP_USER | User name for the mail server | | ||
| SMTP_DOMAIN | Mail domain | | ||
| SMTP_PASS | Password for the user on the mail server, if set empty, then no authentication on the smtp server will be used | | ||
| DOMAIN | Web domain name for hubzilla | | ||
| ADMIN_EMAIL | Administrators email of the deployed hub | | ||
| REDIS_PATH | If set (to something like " tcp://redis") then php sessions will be stored in this redis server (useful for horizontal scalability) | | ||
| LDAP_SERVER | LDAP server name (dont forget to add "ldapauth" to the ADDON_LIST) | | ||
| LDAP_ROOT_DN | LDAP username to connect to (ex: cn=admin,dc=domain,dc=com) | | ||
| LDAP_ADMIN_PASSWORD | Password for that LDAP user | | ||
| LDAP_BASE | Path to look for users in the directory (ex: ou=people,,dc=domain,dc=com) | | ||
| ADDON_LIST | Addons to install/activate during initial configuration | | ||
|
||
# Quick Setup | ||
#### 1. Clone git repository to your server (or wherever you desire Hubzilla to be deployed from). | ||
- eg: `git clone https://github.com/dhitchenor/hubzilla` | ||
- NOTE: you will need to install git for this to work, otherwise you can download the repository in a zip file from GitHub | ||
|
||
#### 2. Edit nginx.conf: | ||
- on line 19, change `domain.com` to your desired server name (eg. funnylookingfaces.com, or <link>www</nolink>.potatogram.net) | ||
- on line 43, change `hub:9000` to match the name (not, container name) of your hubzilla container in your docker-compose.yml file | ||
- NOTE: retain the port (:9000) on this line (see screenshot) | ||
![hub_9000.png](https://raw.githubusercontent.com/dhitchenor/hubzilla/10.0.6/.github/images/hub_9000.png) | ||
#### 3. Edit .env file | ||
##### a) Locations | ||
- depending on how your infrastructure is structured, change the following items appropriately | ||
- LOC_NGINXCONF: the location where the nginx.conf FILE is located (by default, it is in the config folder, which is in the same directory as the docker-compose file) | ||
- LOC_DB: the folder location (directory), where the database should be stored (is your Database stored locally, or on another server?) | ||
##### b) Domain value | ||
- change the `DOMAIN` value to reflect the domain name that you changed earlier, in the `nginx.conf` file | ||
##### c) Further Database Configurations | ||
- depending on the database that you are using, uncomment/comment the appropriate lines, ENSURE the code for the unused database is commented out | ||
- HINT: don't change any port numbers, unless you have to; including database ports, nginx ports, hubzilla ports | ||
- change the `DB agnostic` options to reflect your desired database credentials | ||
- HINT: if you already have a database, you will need to change the values of `DB_NAME`, `DB_USER`, and `DB_PASSWORD` to reflect that database; if no database is present, a database is created for you using these details | ||
- HINT: `DB_HOST` should match the name (not, container name) of the database container used for hubzilla or within the docker-compose.yml file (see screenshot) | ||
![hub_db.png](https://raw.githubusercontent.com/dhitchenor/hubzilla/10.0.6/.github/images/hub_db.png) | ||
|
||
#### 4. Edit docker-compose.yml file | ||
- depending on the database that you are using, uncomment/comment the appropriate healthcheck lines, ENSURE the code for the unused database is commented out | ||
- HINT: default database is postgres; unless you want to use MySQL, you won't need to touch this | ||
|
||
#### 5. Ensure placement of files | ||
- if you have changed the location of any files that you gained when cloning this git repository, ensure the changes are reflected within the docker-compose.yml file | ||
- HINT: by default, the '.env' file should be in the same directory as the docker-compose file | ||
- HINT: by default, the nginx.conf file is in the config folder, which is in the same directory as the docker-compose file | ||
|
||
#### 6. Run docker compose | ||
- eg, `docker-compose up -d` (or `docker-compose up` if you want to see the output of the deployment), and navigate to your domain (in a web browser), after deployment has finished. | ||
- NOTE: the new version of docker compose is out (usage: `docker compose up -d` or `docker compose up` if you want to see the output, as before) | ||
- the `version` level in the docker-compose.yml file is not necessary in the new version of docker compose; for backwards compatibility, it has been retained |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,40 @@ | ||
name: Docker Image CI | ||
name: Hubzilla Container CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
on: push | ||
|
||
jobs: | ||
|
||
build: | ||
if: | | ||
!contains(fromJson('["refs/heads/dev"]'), github.ref) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Get versions | ||
id: version | ||
run: | | ||
echo "::set-output name=major::$(awk -F, '{print $2}' .tags)" | ||
echo "::set-output name=full::$(awk -F, '{print $1}' .tags)" | ||
- name: Docker Setup qemu-action | ||
uses: docker/setup-qemu-action@v1 | ||
- name: Docker Setup Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: DockerHub Login | ||
uses: docker/login-action@v1.6.0 | ||
- id: checkout | ||
name: Checkout | ||
uses: actions/checkout@v4.1.1 | ||
- id: dotenv | ||
name: Dotenv | ||
uses: falti/dotenv-action@v1.1 | ||
- id: qemu_setup | ||
name: Setup QEMU | ||
uses: docker/setup-qemu-action@v3.0.0 | ||
- id: buildx_setup | ||
name: Setup Buildx | ||
uses: docker/setup-buildx-action@v3.1.0 | ||
- id: dckrhub_login | ||
name: DockerHub Login | ||
uses: docker/login-action@v3.0.0 | ||
with: | ||
username: ${{ github.repository_owner }} | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Github Login | ||
uses: docker/login-action@v1.6.0 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GH_CAT_TOKEN }} | ||
|
||
- name: Build the Docker image | ||
uses: docker/build-push-action@v2 | ||
- id: build_push | ||
name: Build the Docker image | ||
uses: docker/build-push-action@v5.1.0 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 | ||
push: true | ||
tags: | | ||
${{ github.repository }}:latest | ||
${{ github.repository }}:${{ steps.version.outputs.full }} | ||
${{ github.repository }}:${{ steps.version.outputs.major }} | ||
ghcr.io/${{ github.repository }}:latest | ||
ghcr.io/${{ github.repository }}:${{ steps.version.outputs.full }} | ||
ghcr.io/${{ github.repository }}:${{ steps.version.outputs.major }} | ||
dhitchenor/hubzilla:latest | ||
dhitchenor/hubzilla:${{ steps.dotenv.outputs.ver_full }} | ||
dhitchenor/hubzilla:${{ steps.dotenv.outputs.ver_major }} |
Oops, something went wrong.