Skip to content

Instantly share code, notes, and snippets.

@int2001
Last active March 5, 2024 07:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save int2001/f599c705c628039b8d6e5f3af7cedbfb to your computer and use it in GitHub Desktop.
Save int2001/f599c705c628039b8d6e5f3af7cedbfb to your computer and use it in GitHub Desktop.
Dockerize Wavelog
  • intall Docker-Desktop
  • create folder "wavelog_docker"
  • cd into that folder and clone latest wavelog
  • now cd into the fresh wavelog folder which was created by git clone
  • create a File called "Dockerfile" there (contents see below)
  • cd back into wavelog_docker folder
  • create file called docker-compose.yml (contents see below)

Now the magic starts

  • type docker-compose up -d while standing in your wavelog_docker folder navigate your browser to 127.0.0.1:8086 and start installing. Hint: DB-Host is called wavelog-db. User/pass/dbname is: wavelog

Database can be accessed with your favourite DB-Client via 127.0.0.1:23306 (wavelog/wavelog)

You can simply "destroy" the whole installation within your Docker-Desktop-UI (Stop and Delete, don't forget to delete Volumes/Images as well). rm the config.php and database.php. Now you are able to start the whole thing with docker-compose -up d from scratch. Or you can stop the containers and start them again whenever you like.

All changes within the filesystem take immediatly effect on your wavelog installation, like you're running in plain

version: '3'
services:
wavelog-db:
image: mariadb:latest
container_name: wavelog-mysql
environment:
MARIADB_RANDOM_ROOT_PASSWORD: yes
MARIADB_DATABASE: wavelog
MARIADB_USER: wavelog
MARIADB_PASSWORD: wavelog # <- Insert a strong password here
volumes:
- wavelog-dbdata:/var/lib/mysql
ports:
- "23306:3306"
restart: unless-stopped
wavelog-main:
container_name: wavelog-main
build:
context: ./wavelog/
depends_on:
- wavelog-db
volumes:
# - wavelog-config:/var/www/html/application/config
- wavelog-backup:/var/www/html/application/backup
- wavelog-uploads:/var/www/html/application/uploads
- ./wavelog:/var/www/html
ports:
- "8086:80"
restart: unless-stopped
volumes:
wavelog-dbdata:
wavelog-backup:
wavelog-uploads:
FROM php:8.3-apache
RUN touch /usr/local/etc/php/conf.d/uploads.ini \
&& echo "file_uploads = On" >> /usr/local/etc/php/conf.d/uploads.ini \
&& echo "memory_limit = 256M" >> /usr/local/etc/php/conf.d/uploads.ini \
&& echo "upload_max_filesize = 64M" >> /usr/local/etc/php/conf.d/uploads.ini \
&& echo "post_max_size = 64M" >> /usr/local/etc/php/conf.d/uploads.ini \
&& echo "max_execution_time = 600" >> /usr/local/etc/php/conf.d/uploads.ini
RUN apt-get update \
&& apt-get install -y git curl libxml2-dev libonig-dev libzip-dev
RUN docker-php-ext-install mysqli mbstring xml zip
#RUN docker-php-ext-install curl
#RUN docker-php-ext-install openssl
#RUN rm -rf /var/www/html/docker/
#COPY ./ /var/www/html/
WORKDIR /var/www/html
# Setting permissions
RUN echo "Setting root as owner of the html folder"
RUN chown -R www-data:www-data /var/www/html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment