Patrick Burns 2024-04-16 10:59:14 -07:00 zatwierdzone przez GitHub
commit 2aedac2847
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
6 zmienionych plików z 103 dodań i 11 usunięć

6
.env.sample 100644
Wyświetl plik

@ -0,0 +1,6 @@
MYSQL_ROOT_PASSWORD=rootpassword
MYSQL_DATABASE=cloudlog
MYSQL_USER=cloudlog
MYSQL_PASSWORD=cloudlogpassword
MYSQL_HOST=db
MYSQL_PORT=3306

1
.gitignore vendored
Wyświetl plik

@ -18,3 +18,4 @@
sync.sh
*.p12
*.swp
.env

29
Dockerfile 100644
Wyświetl plik

@ -0,0 +1,29 @@
# Use the official image for PHP and Apache
FROM php:7.4-apache
# Set the working directory to /var/www/html
WORKDIR /var/www/html
# Install system dependencies, including git and libxml2
RUN apt-get update && apt-get install -y \
libcurl4-openssl-dev \
libxml2-dev \
libzip-dev \
zlib1g-dev \
libpng-dev \
libonig-dev \
default-mysql-client \
curl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-install pdo_mysql \
&& docker-php-ext-install mysqli \
&& docker-php-ext-install gd \
&& docker-php-ext-install mbstring \
&& docker-php-ext-install zip \
&& docker-php-ext-install xml \
&& a2enmod rewrite
# Expose port 80
EXPOSE 80

Wyświetl plik

@ -11,24 +11,58 @@ Core Contributors: 2M0SQL ([@magicbug](https://github.com/magicbug)), LA8AJA ([@
Website: [http://www.cloudlog.co.uk](http://www.cloudlog.co.uk)
## Requirements
* Linux based Operating System
* Apache (Nginx should work)
* PHP Version 7.4 (PHP 8.2 works)
* MySQL (MySQL 5.7 or higher)
- Linux based Operating System
- Apache (Nginx should work)
- PHP Version 7.4 (PHP 8.2 works)
- MySQL (MySQL 5.7 or higher)
Notes
* If you want to log microwave QSOs you will need to use a 64bit operating system.
* We do not provide Docker support, however you are free to use it if you wish but we will not handle support.
- If you want to log microwave QSOs you will need to use a 64bit operating system.
- We do not provide Docker support, however you are free to use it if you wish but we will not handle support.
## Setup
Installation information can be found on the [wiki](https://github.com/magicbug/Cloudlog/wiki).
# Docker Development Environment
This guide provides instructions for setting up a local development environment using Docker and Docker Compose. Please note that this setup is not recommended for production use.
## Prerequisites
Before you begin, you need to install Docker and Docker Compose. You can download them using the following links:
- [Docker](https://docs.docker.com/get-docker/)
- [Docker Compose](https://docs.docker.com/compose/install/)
## Configuration
1. Copy the `.env.sample` file to `.env`:
```bash
cp .env.sample .env
```
2. Open the `.env` file and update the values to match your setup. The values from the `.env` file will be used to populate the database connection details on the install page. You should not need to change these unless your setup requires different values.
**Note:** Docker Compose creates a network for your application, and each service (container) in the Docker Compose file can reach each other via the service name. This is why the `DB_HOST` value in the `.env` file and on the install page should match the service name of the database in the `docker-compose.yml` file. For example, if the database service in `docker-compose.yml` is defined as `db`, then `DB_HOST` should be set as 'db'. This allows the application to communicate with the database service on its internal docker network.
## Starting the Development Environment
To start the development environment, run the following command in your terminal:
```bash
docker-compose up
```
## Support
Cloudlog has two support systems for code issues use Github issues, however if you have general issues with setting up your server please use our general discussion forum [https://github.com/magicbug/Cloudlog/discussions](https://github.com/magicbug/Cloudlog/discussions).
## Security Vulnerabilities
If you discover a security vulnerability within Cloudlog, please send an e-mail to Peter Goodhall, 2M0SQL via [peter@magicbug.co.uk](mailto:peter@magicbug.co.uk). All security vulnerabilities will be promptly addressed.
## Want Cloudlog Hosting?
@ -53,4 +87,4 @@ Cloudlog is supported by Patreon and donations via PayPal, thanks to the followi
Paul (M0TZO), Tim (G4VXE), Paul (N8HM), Michelle (W5NYV), Mitchell (AD0HJ), Dan (M0TCB), Martin (DK3ML), Juan Carlos (EA5WA), Iain (M0PCB), Charlie (GM1TGY), Ondrej (OK1CDJ), Trystan (G0KAY), Oliver (DL6KBG), Volkmar Schirmer, Jordan (M0PIR), Thomas Ziegler, Mathis (DB9MAT), Ken (VE3HLS), Tyler (WL7T), Jeremy Taylor, Ben Kuhn, Eric Thresher, Michael Cullen, Juuso (OH1JW), Anthony Castiglia, Fernando Ramirez-Ferrer, Robert Dixon, Mark Percival, Julia (KV1V), Timo Tomasini, Ant (NU1U), Christopher Williams, Danny Barnes, Vic, Tom (M0LTE), smurphboy, Lars (SM0TGU), Theo (PD9DP), Stefan (SM0RGM). Peter (G0ABI), Lou (KI5FTY), Michael (DG3NAB), Dragan (4O4A), minorsecond, Emily (W7AYQ), Steve (M0SKM), Rob (M0VFC), Doug (WA6L), Petr (OK1PKR), Fabian (HB9HIL), Daniel (OK2VLK), John (M5JFS).
If you'd like to donate to Cloudlog to help allow @magicbug spend less time doing commercial work and more time coding Cloudlog then you can donate via [PayPal](https://paypal.me/PGoodhall), [Github Sponsor](https://github.com/sponsors/magicbug) or become a [Patreon](https://www.patreon.com/2m0sql)
If you'd like to donate to Cloudlog to help allow @magicbug spend less time doing commercial work and more time coding Cloudlog then you can donate via [PayPal](https://paypal.me/PGoodhall), [Github Sponsor](https://github.com/sponsors/magicbug) or become a [Patreon](https://www.patreon.com/2m0sql)

22
docker-compose.yml 100644
Wyświetl plik

@ -0,0 +1,22 @@
version: "3.8"
services:
web:
build: .
env_file:
- .env
ports:
- "80:80"
volumes:
- ./:/var/www/html:rw
depends_on:
- db
db:
image: mariadb:latest
env_file:
- .env
volumes:
- db_data:/var/lib/mysql
volumes:
db_data: {}

Wyświetl plik

@ -148,10 +148,10 @@ if($_POST) {
<fieldset>
<legend>Database settings</legend>
<label for="hostname">Hostname</label><input type="text" id="hostname" value="localhost" class="input_text" name="hostname" />
<label for="username">Username</label><input type="text" id="username" class="input_text" name="username" />
<label for="password">Password</label><input type="password" id="password" class="input_text" name="password" />
<label for="database">Database Name</label><input type="text" id="database" class="input_text" name="database" />
<label for="hostname">Hostname</label><input type="text" id="hostname" value="<?php echo getenv('MYSQL_HOST') ?: 'localhost'; ?>" class="input_text" name="hostname" />
<label for="username">Username</label><input type="text" id="username" value="<?php echo getenv('MYSQL_USER'); ?>" class="input_text" name="username" />
<label for="password">Password</label><input type="password" id="password" value="<?php echo getenv('MYSQL_PASSWORD'); ?>" class="input_text" name="password" />
<label for="database">Database Name</label><input type="text" id="database" value="<?php echo getenv('MYSQL_DATABASE'); ?>" class="input_text" name="database" />
<input type="submit" value="Install" id="submit" />
</fieldset>
</form>