Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes related to docker builds (#57)
* Now spawns without issue * MySQL initdb corrections may still be required * Fixed minor docker issues
- Loading branch information
Showing
10 changed files
with
161 additions
and
88 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Project specific files | ||
.github/ | ||
.git/ | ||
docs/ | ||
Dockerfile | ||
*.log | ||
.dockerignore |
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,47 @@ | ||
name: Build and deploy multiarch image | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
paths-ignore: | ||
- 'docs/**' | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
docker: | ||
name: Build and push image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- | ||
name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v2 | ||
env: | ||
IMG_NAME: ${{ 'krishnaalagiri/rems' }} | ||
# Versioning: MAJOR.MINOR.PATCH (eg., 1.2.3) | ||
VERSION_FULL: ${{ '1.1.6' }} | ||
# For v1.2.3, VERSION_SHORT is '1.2' | ||
VERSION_SHORT: ${{ '1.1' }} | ||
# For v1.2.3, VERSION_MAJOR is '1' | ||
VERSION_MAJOR: ${{ '1' }} | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ env.IMG_NAME }}:latest,${{ env.IMG_NAME }}:${{ env.VERSION_FULL }},${{ env.IMG_NAME }}:${{ env.VERSION_SHORT }},${{ env.IMG_NAME }}:${{ env.VERSION_MAJOR }} |
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 |
---|---|---|
|
@@ -26,3 +26,8 @@ members/secrets_.php | |
assets/img/avatars/users/* | ||
|
||
members/test.php | ||
|
||
# IDE specific files | ||
.DS_Store | ||
.vscode/ | ||
.idea/ |
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,15 +1,21 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
FROM php:7.2-apache | ||
LABEL in.thekrishna.rems.email="krishna.alagiri03@gmail.com" | ||
LABEL in.thekrishna.rems.authors="Krishnakanth, Mahalakshumi" | ||
LABEL in.thekrishna.rems.link="https://github.com/bearlike/REMS-For-Organisations" | ||
LABEL in.thekrishna.rems.title="Resources and Event Management System (REMS)" | ||
|
||
# Lablelling | ||
LABEL com.rems.title="Resources and Event Management System (REMS)" | ||
LABEL com.rems.version="1.1.6" | ||
LABEL com.rems.authors="Krishnakanth, Mahalakshumi" | ||
LABEL com.rems.repository="https://github.com/bearlike/REMS-For-Organisations" | ||
LABEL com.rems.description="Resources and Event Management System for small organisations and clubs. Bulk mailer, certificate generation and much more." | ||
|
||
# Installing dependencies | ||
RUN rm /etc/apt/preferences.d/no-debian-php | ||
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ | ||
RUN chmod +x /usr/local/bin/install-php-extensions && sync && \ | ||
install-php-extensions gd xdebug | ||
RUN install-php-extensions pdo_mysql | ||
|
||
# Copying project and (template) secrets file | ||
COPY . /var/www/html/ | ||
COPY docker/secrets_.php /var/www/html/members | ||
RUN rm -r /var/www/html/docs /var/www/html/.git | ||
COPY docker/secrets_.php /var/www/html/members |
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
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,38 +1,53 @@ | ||
# Docker compose file for bearlike/REMS-for-Organisations | ||
|
||
# Docker build related issues can be raised here: | ||
# * https://github.com/bearlike/REMS-For-Organisations/issues/new?labels=Docker | ||
|
||
# Execute by running: | ||
# docker-compose up -d | ||
|
||
version: '3' | ||
|
||
services: | ||
rems-app: | ||
image: krishna/rems:latest | ||
ports: | ||
- 8080:80 | ||
volumes: | ||
- rems_gen_certs:/var/www/html/public/Generated Certificate | ||
networks: | ||
- rems-network | ||
|
||
rems-mysql: | ||
image: mysql | ||
database: | ||
image: mariadb:10.7.3-focal | ||
restart: always | ||
ports: | ||
# We recommend commenting the ports block for increased security. | ||
# Exposing the database port is intended only for debugging. | ||
- 3306:3306 | ||
volumes: | ||
- rems_mysql:/var/lib/mysql | ||
- ./docker/mysql:/docker-entrypoint-initdb.d | ||
- database_volume:/var/lib/mysql | ||
- ./docker/mysql:/docker-entrypoint-initdb.d # Load SQL files during database creation | ||
environment: | ||
- MYSQL_ROOT_PASSWORD="0000" | ||
- MYSQL_DATABASE="db_cms" | ||
networks: | ||
rems-network: | ||
ipv4_address: 172.16.238.10 | ||
MYSQL_ROOT_PASSWORD: "0000" | ||
MYSQL_PASSWORD: "0000" | ||
MYSQL_DATABASE: "db_cms" | ||
MYSQL_USER: "cmsuser" | ||
healthcheck: | ||
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"] | ||
timeout: 20s | ||
retries: 15 | ||
|
||
networks: | ||
rems-network: | ||
driver: bridge | ||
ipam: | ||
driver: default | ||
config: | ||
- subnet: 172.16.238.0/24 | ||
app: | ||
image: krishnaalagiri/rems:1.1.6 | ||
restart: on-failure | ||
depends_on: | ||
- database | ||
ports: | ||
# <host port>:<container port (default=80)> | ||
- 8080:80 | ||
volumes: | ||
# Replace generated_certificates_volume with an absolute path if you | ||
# need direct access to the certificates. Usually not required. | ||
- "generated_certificates_volume:/var/www/html/public/Generated Certificate" | ||
- ./docker/secrets_.php:/var/www/html/members/secrets_.php | ||
environment: | ||
# * Edit docker/secrets_.php for other enviroiment variables. | ||
MYSQL_HOST: database | ||
MYSQL_PASSWORD: "0000" | ||
MYSQL_USER: "cmsuser" | ||
|
||
volumes: | ||
rems_mysql: | ||
rems_gen_certs: | ||
|
||
database_volume: | ||
generated_certificates_volume: |
This file was deleted.
Oops, something went wrong.
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
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,36 +1,39 @@ | ||
<?php | ||
/* Fill in all these details to get your system up and running. Rename this file to secrets_.php */ | ||
/* Sample Values Filled */ | ||
$OrgName = 'SVCE-ACM'; | ||
$servername = '172.16.238.10'; // Name of server (Docker network IP) | ||
$username = 'cmsuser'; // User name for the database | ||
$password = 'random_password'; // Password for the database | ||
$MainDB = 'db_cms'; // Name of the main database where all CMS information is stored (login, certificates, event information) | ||
$formDB = "db_forms"; // Name of the database for recording generated form details | ||
$mailerDB = "db_mailer"; // Name of the mailer database | ||
$startPath = ''; // Leave it blank if the files are in the root location of your web server else fill in with the location | ||
/* Secrets and enviroinment file for Docker instances. */ | ||
|
||
/* Sample Values Filled. You must alter to your preference, otherwise you | ||
might have limited or no functionality */ | ||
|
||
$OrgName = 'SVCE-ACM'; // Name of the organisation | ||
$servername = getenv('MYSQL_HOST'); // (Not recommended to change) Name of server. | ||
$username = getenv('MYSQL_USER'); // (Not recommended to change) User name for the database. | ||
$password = getenv('MYSQL_PASSWORD'); // (Not recommended to change) Password for the database. | ||
$MainDB = 'db_cms'; // (Not recommended to change) Name of the main database where all CMS information is stored. | ||
$formDB = "db_forms"; // (Not recommended to change) Name of the database for recording generated form details. | ||
$mailerDB = "db_mailer"; // (Not recommended to change) Name of the mailer database. | ||
$startPath = ''; // (Not recommended to change) Root of the platform. | ||
|
||
/* Mailer Details */ | ||
$mailerHostname = "sample.host.name"; | ||
$mailerUname = "sample_mail@sample.host.name"; | ||
$mailerPassword = "sample_mail_password"; | ||
$mailerHostname = "sample.host.name"; // SMTP Hostname | ||
$mailerUname = "sample_mail@sample.host.name"; // SMTP email username | ||
$mailerPassword = "sample_mail_password"; // SMTP email password | ||
|
||
/* Default mail template details */ | ||
$buttonLabel = "Click here"; // Label that is present in button | ||
$buttonURL = "https://sample.org/"; // URL that button directs too | ||
$logoURL = "https://sample.org/logo.png"; // URL for organisation logo in mail | ||
$buttonLabel = "Click here"; // (Recommended) Label that is present in button | ||
$buttonURL = "https://sample.org/"; // URL that button directs too | ||
$logoURL = "https://sample.org/logo.png"; // URL for organisation logo in mail | ||
$coverURL = "https://sample.org/cover.jpg"; // URL for organisation cover page in mail | ||
|
||
/* Forgot Password section details */ | ||
$hostName = "localhost/domain/"; // Host name for local testing | ||
// $hostName = "sample.host.name/"; // Host name for deployment | ||
$forgotPwdExtension = "members/change-password.php"; //Path to change password page | ||
$hostName = "localhost/domain/"; // Host name for local testing | ||
// $hostName = "sample.host.name/"; // Host name for deployment | ||
$forgotPwdExtension = "members/change-password.php"; //Path to change password page | ||
|
||
/* Forgot Password Mail Template details */ | ||
$reachEmail = 'sample@sample.host.name'; // contact mail-id present in the forgot password email | ||
$darkLogo = 'https://sample.logo/path'; // Path for organisation logo in forgot password mail | ||
$logoHREF = "https://sample.org"; // Website that clicking on organisation logo leads to | ||
$reachEmail = 'sample@sample.host.name'; // contact mail-id present in the forgot password email | ||
$darkLogo = 'https://sample.logo/path'; // Path for organisation logo in forgot password mail | ||
$logoHREF = "https://sample.org"; // Website that clicking on organisation logo leads to | ||
|
||
/* API Keys */ | ||
$shortcm_authorization = "ABCDEFABCDEFABCDEFABCDEF"; // Visit https://short.io/features/api for more details | ||
$shortcm_domain = "sample.domain"; // Domain for generating the shortened URL | ||
$shortcm_authorization = "ABCDEFABCDEFABCDEFABCDEF"; // Visit https://short.io/features/api for more details | ||
$shortcm_domain = "sample.domain"; // Domain for generating the shortened URL |