Skip to content

Commit

Permalink
Merge branch 'develop' into refactor-installer
Browse files Browse the repository at this point in the history
  • Loading branch information
johannac authored Jan 19, 2023
2 parents 1887dc2 + 3a3e042 commit d8f999f
Show file tree
Hide file tree
Showing 383 changed files with 11,322 additions and 4,941 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
node_modules
.env
19 changes: 15 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
ATTENDIZE_DEV=true
ATTENDIZE_CLOUD=false

APP_NAME=Attendize
APP_ENV=production
APP_ENV=local
APP_KEY=
APP_DEBUG=false
APP_URL=
APP_DEBUG=true
APP_URL=https://localhost:8081

LOG_CHANNEL=stack

Expand All @@ -25,7 +28,7 @@ REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=maildev
MAIL_PORT=25
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
Expand Down Expand Up @@ -55,9 +58,17 @@ MAIL_FROM_NAME=testing_service
# https://github.com/NitMedia/wkhtml2pdf#driver-types
WKHTML2PDF_BIN_FILE=wkhtmltopdf-amd64

# Google Analytics
GOOGLE_ANALYTICS_ID=
GOOGLE_MAPS_GEOCODING_KEY=

# Captcha Configuration
CAPTCHA_IS_ON=false
# can be recaptcha or hcaptcha
CAPTCHA_TYPE=
CAPTCHA_KEY=
CAPTCHA_SECRET=

TWITTER_WIDGET_ID=

LOG=errorlog
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# These are supported funding model platforms
open_collective: attendize
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG] Describe your bug"
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environment the bug happens in (Desktop, Mobile, CLI) (please complete the following information):**
- OS: [e.g. Mac, iOS, Windows]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Version of Attendize you are using**
- Master branch or release tag

**Where you are running Attendize**
- in Docker, a Virtual Machine, Shared Webhost, VPS etc

**What version or Operating System are you using on the above server**
- e.g. Ubuntu 14.04

**What version of PHP you are using on the above server**
- e.g PHP 7.1
**What web server are you using Attendize with**
- Nginx or Apache.

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[FEATURE] Describe your feature"
labels: feature
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
33 changes: 26 additions & 7 deletions .github/workflows/laravel.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
name: Attendize

on:
pull_request:
types: [assigned, edited, opened, synchronize, reopened]
push:
branches:
- next
- master
- v2*

jobs:
laravel-tests:
laravel-build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
- name: Generate key
run: php artisan key:generate
uses: php-actions/composer@v4
with:
command: install
args: --no-ansi --prefer-dist
php_version: 7.4
composer_version: 2
interaction: no
suggest: no
dev: yes
progress: no
quiet: no
- name: Create Database
run: |
mkdir -p database
Expand All @@ -24,4 +34,13 @@ jobs:
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: vendor/bin/phpunit -c phpunit.xml
uses: php-actions/composer@v4
with:
command: exec phpunit
php_version: 7.4
composer_version: 2
interaction: no
suggest: no
dev: yes
progress: no
quiet: no
8 changes: 8 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file lists people who have contributed content to the repository.
Sebastian Schmidt ([Github](https://github.com/publicarray))
Brett B ([Github](https://github.com/bretto36))
G0dLik3 ([Github](https://github.com/G0dLik3))
Honoré Hounwanou ([Github](http://github.com/mercuryseries))
James Campbell ([Github](https://github.com/jncampbell))
JapSeyz ([Github](https://github.com/JapSeyz))
Mark Walet ([Github](https://github.com/markwalet))
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
25 changes: 25 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Contributing to Attendize
You'd like to contribute to Attendize? Amazing! Thank you so much! Feel free to fork and contribute. If you are unsure about adding a feature, please create a Github issue to ask for feedback.

## Ways to Contribute

### Bug Reports
If you encounter a bug in Attendize, please first search the list of current open [Issues on the GitHub repository](https://github.com/Attendize/Attendize/issues). You may add additional feedback on an existing bug report. If the issue you're having has not yet been reported, please open a new issue. There is a template available for new issues. Please fill out all information requested in the template so we can help you more easily.

### Support
Please note: support is not offered from the project maintainers through GitHub. Paid support is available by [purchasing a license](http://www.attendize.com/license.html). You may submit support requests in a GitHub issue to see if someone in the community is able to offer help or advice. Support issues will be automatically closed after 7 days to keep the size of the issues list down.

### Pull Requests
If you'd like to contribute code with a bug fix, new feature or enhancement, please do so via a [pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork). Adding details in the PR description about what your changes are and why you implemented will help us to review and merge it sooner. Please ensure you add or update the tests along with your changes, as well as documentation if it's applicable.

### Tests and Documentation
Contributions of tests and documentation are always welcome too!

### Comments, Feedback and Reviews
If you're able to provide comments, feedback or reviews on the issues or pull requests from other users, that is greatly appreciated too! The more feedback and input the change receives, the better it will be, so this helps us a lot and helps the community too!

## Licensing
Any code, tests or documention you decide to contribute will become part of the Attendize code base and will be subject to the [standard license](LICENSE).

## Code of Conduct
Being part of the Attendize community and contributing to that community includes abiding by our [Code of Conduct](CODE_OF_CONDUCT.md)
40 changes: 40 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Multi stage docker file for the Attendize application layer images

# Base image with nginx, php-fpm and composer built on debian
FROM wyveo/nginx-php-fpm:php74 as base
RUN apt-get update && apt-get install -y wait-for-it libxrender1

# Set up code
WORKDIR /usr/share/nginx/html
COPY . .

# run composer, chmod files, setup laravel key
RUN ./scripts/setup

# The worker container runs the laravel queue in the background
FROM base as worker

CMD ["php", "artisan", "queue:work", "--daemon"]

# The web container runs the HTTP server and connects to all other services in the application stack
FROM base as web

# nginx config
COPY nginx.conf /etc/nginx/conf.d/default.conf

# self-signed ssl certificate for https support
RUN openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt -subj "/C=GB/ST=London/L=London/O=NA/CN=localhost" \
&& openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 \
&& mkdir /etc/nginx/snippets
COPY self-signed.conf /etc/nginx/snippets/self-signed.conf
COPY ssl-params.conf /etc/nginx/snippets/ssl-params.conf

# Ports to expose
EXPOSE 80
EXPOSE 443

# Starting nginx server
CMD ["/start.sh"]

# NOTE: if you are deploying to production with this image, you should extend this Dockerfile with another stage that
# performs clean up (i.e. removing composer) and installs your own dependencies (i.e. your own ssl certificate).
52 changes: 52 additions & 0 deletions Dockerfile-apache
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Run Attendize on an apache server
# Multi stage docker file for the Attendize application layer images

# Base image with apache, php, composer and mysql built on ubuntu
FROM leen15/apache-php-mysql as base

# update composer to v2
RUN composer self-update

# install dependencies
RUN apt-get update && apt-get install -y \
libpq-dev \
libpng-dev \
libjpeg62-dev \
libfreetype6-dev \
libxrender1 \
libfontconfig \
libxext-dev \
libglib2.0-0 \
php-mysql \
php-pgsql \
php-gd \
php-zip \
zip \
unzip git nano \
wait-for-it

# Set up code
WORKDIR /var/www
COPY . .

# run composer, chmod files, setup laravel key
RUN ./scripts/setup

# The worker container runs the laravel queue in the background
FROM base as worker

CMD ["php", "artisan", "queue:work", "--daemon"]

# The web container runs the HTTP server and connects to all other services in the application stack
FROM base as web

# TODO: Add self signed SSL certificate

# Port to expose
EXPOSE 80

# Starting apache server
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]

# NOTE: if you are deploying to production with this image, you should extend this Dockerfile with another stage that
# performs clean up (i.e. removing composer) and installs your own dependencies (i.e. your own ssl certificate).
18 changes: 0 additions & 18 deletions Dockerfile-composer

This file was deleted.

Loading

0 comments on commit d8f999f

Please sign in to comment.