Skip to content

Commit

Permalink
Merge branch 'craigk5n:master' into lintall
Browse files Browse the repository at this point in the history
  • Loading branch information
bbannon authored Nov 29, 2023
2 parents 0b4c949 + e683ee0 commit 1b1ccb9
Show file tree
Hide file tree
Showing 27 changed files with 315 additions and 356 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php-syntax-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Check PHP syntax
run: |
Expand Down
14 changes: 0 additions & 14 deletions docker/Dockerfile-php7

This file was deleted.

18 changes: 11 additions & 7 deletions docker/Dockerfile-php8
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#escape=`
# To run on Windows, where \ is the path separator.

FROM php:8.0-apache
# MAINTAINER deprecated in favor of LABEL.
LABEL craigk5n <craig@k5n.us>
LABEL vendor "k5n.us"
# Use the official PHP image with Apache
FROM php:8-apache
LABEL maintainer="craig@k5n.us"
LABEL vendor="k5n.us"

# Install mysqli extension
RUN docker-php-ext-install mysqli

# Copy all files except those in .dockerignore
Expand All @@ -15,3 +13,9 @@ COPY . /var/www/html/
# to allow the web-based installer to update it.
RUN touch /var/www/html/includes/settings.php
RUN chmod 777 /var/www/html/includes/settings.php

# Set working directory
WORKDIR /var/www/html

# Start Apache server in the foreground
CMD ["apache2-foreground"]
25 changes: 17 additions & 8 deletions docker/Dockerfile-php8-dev
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
FROM php:8.0-apache
LABEL org.opencontainers.image.authors="craig@k5n.us"
# Use the official PHP image with Apache
FROM php:8-apache
LABEL maintainer="craig@k5n.us"
LABEL vendor="k5n.us"

# Install mysqli extension
RUN docker-php-ext-install mysqli

#COPY docker/cron-hourly /tmp/cron.hourly
#RUN crontab /tmp/cron.hourly
# Install GD extension and its dependencies
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd

# Run the cron every hour
#RUN echo '0 * * * * php /var/www/html/tools/send_reminders.php' > /etc/crontabs/root
#TODO: setup cron
# Set working directory
WORKDIR /var/www/html

#RUN chown -R www-data:www-data /var/www
# Start Apache server in the foreground
CMD ["apache2-foreground"]
44 changes: 0 additions & 44 deletions docker/docker-compose-php7.yml

This file was deleted.

7 changes: 4 additions & 3 deletions docker/docker-compose-php8-dev.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Run docker-compose from the top-level WebCalendar directory and not from this "docker" subdirectory.
# The first time you run this, you will need to grant permission
# for the webcalendar user to access mariadb (after you have run
# docker-compose up). You only need to do this once.
#
# Start a shell on the mariadb container:
# docker-compose -f docker-compose-php8.yml exec db /bin/sh
# docker-compose -f docker/docker-compose-php8-dev.yml exec db /bin/sh
# Start the mariadb client:
# /bin/mariadb -p
# (enter the MYSQL_ROOT_PASSWORD below)
Expand All @@ -14,7 +15,7 @@
#
# If you need shell access on the webserver container running WebCalendar, you can use
# the following command:
# docker-compose -f docker-compose-php8.yml exec webcalendar-php8 /bin/sh
# docker-compose -f docker/docker-compose-php8-dev.yml exec webcalendar-php8 /bin/sh

version: '3.1'

Expand Down Expand Up @@ -42,7 +43,7 @@ services:
ports:
- 8080:80
volumes:
- .:/var/www/html/
- ..:/var/www/html/

volumes:
mysql-data:
5 changes: 3 additions & 2 deletions docker/docker-compose-php8.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Run docker-compose from the top-level WebCalendar directory and not from this "docker" subdirectory.
# The first time you run this, you will need to grant permission
# for the webcalendar user to access mariadb (after you have run
# docker-compose up). You only need to do this once.
#
# Start a shell on the mariadb container:
# docker-compose -f docker-compose-php8.yml exec db /bin/sh
# docker-compose -f docker/docker-compose-php8.yml exec db /bin/sh
# Start the mariadb client:
# /bin/mariadb -p
# (enter the MYSQL_ROOT_PASSWORD below)
Expand All @@ -14,7 +15,7 @@
#
# If you need shell access on the webserver container running WebCalendar, you can use
# the following command:
# docker-compose -f docker-compose-php8.yml exec webcalendar-php8 /bin/sh
# docker-compose -f docker/docker-compose-php8.yml exec webcalendar-php8 /bin/sh

version: '3.1'

Expand Down
Loading

0 comments on commit 1b1ccb9

Please sign in to comment.