mirror of
https://github.com/michaelstaake/mainty.git
synced 2026-04-16 19:40:13 +00:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac98a7714a | ||
|
|
b0dec9d3e3 | ||
|
|
444c94c898 | ||
|
|
a4cf82a470 | ||
|
|
cce8dacea6 | ||
|
|
4b6315ce6b | ||
|
|
90e076d94c | ||
|
|
83fa46f264 | ||
|
|
ea417295f9 | ||
|
|
d3682aaa94 | ||
|
|
7440004210 | ||
|
|
d0a0d7a0b7 |
11
DOCKER.md
11
DOCKER.md
@@ -126,8 +126,6 @@ For production:
|
||||
Example production `docker-compose.yml`:
|
||||
|
||||
```yaml
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mainty:
|
||||
build: .
|
||||
@@ -136,12 +134,9 @@ services:
|
||||
- "8080:80"
|
||||
volumes:
|
||||
- ./data:/var/www/html/data
|
||||
# Uncomment below to sync code changes in development
|
||||
# - .:/var/www/html
|
||||
environment:
|
||||
- APACHE_DOCUMENT_ROOT=/var/www/html
|
||||
restart: always
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
37
README.md
37
README.md
@@ -1,16 +1,33 @@
|
||||
# Mainty
|
||||
|
||||
A simple PHP web app for tracking vehicle maintenance records. Free, simple, open source, and self-hosted. Runs on any Apache/PHP web server, or use Docker. Uses SQLite for easy backup, with built-in Export via JSON or HTML so you can import that data into something else or print records for your mechanic or the next owner of your vehicle.
|
||||
A simple PHP web app for tracking vehicle maintenance records. Free, easy, responsive, open source, and self-hosted. Use Docker, or host it on any Apache/PHP web server. Uses SQLite for easy backup, with built-in Export via JSON or HTML so you can import that data into something else or print records for your mechanic or the next owner of your vehicle.
|
||||
|
||||
## Requirements
|
||||
|
||||
- If you're using Docker, these requirements should be handled automatically, and you don't need to worry about them:
|
||||
- Apache web server
|
||||
- PHP 8 or higher
|
||||
- SQLite extension
|
||||
|
||||
## Installation
|
||||
|
||||
### Option 1: Traditional Web Server
|
||||
### Option 1: Docker
|
||||
|
||||
Once you have Docker working on your system, enter the directory where you have placed Mainty and run the following command to start the services:
|
||||
|
||||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
Then open http://localhost:8080
|
||||
|
||||
When you are done using Mainty, you can run the following command to stop the services:
|
||||
|
||||
```bash
|
||||
docker-compose down
|
||||
```
|
||||
|
||||
### Option 2: Traditional Web Server
|
||||
|
||||
1. Upload the entire folder to your web server
|
||||
2. Rename `example.htaccess` to `.htaccess`
|
||||
@@ -22,18 +39,6 @@ A simple PHP web app for tracking vehicle maintenance records. Free, simple, ope
|
||||
5. If everything is configured correctly, you'll see the setup page
|
||||
6. Set your password to initialize the database
|
||||
|
||||
### Option 2: Docker
|
||||
## Need help? Want to learn more?
|
||||
|
||||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
Then open http://localhost:8080
|
||||
|
||||
## First Time Setup
|
||||
|
||||
When you first access the app, you'll be prompted to:
|
||||
1. Create a password
|
||||
2. Initialize the database
|
||||
|
||||
That's it! You're ready to start tracking your vehicle maintenance.
|
||||
https://michaelstaake.com/projects/mainty/
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mainty:
|
||||
build: .
|
||||
|
||||
@@ -2,6 +2,9 @@ RewriteEngine On
|
||||
#if this is in a folder, edit this. example.com/mainty/ would be /mainty/
|
||||
RewriteBase /
|
||||
|
||||
# Block access to data directory
|
||||
RewriteRule ^data/ - [F,L]
|
||||
|
||||
# Redirect to HTTPS (optional, uncomment if needed)
|
||||
# RewriteCond %{HTTPS} off
|
||||
# RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
|
||||
|
||||
@@ -38,7 +38,13 @@
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<h2 class="text-2xl font-bold text-gray-800 mb-6">Settings</h2>
|
||||
<div class="flex justify-between items-center mb-6">
|
||||
<h2 class="text-2xl font-bold text-gray-800">Settings</h2>
|
||||
<a href="<?php echo url('/logout'); ?>"
|
||||
class="inline-flex items-center bg-red-100 hover:bg-red-200 text-red-700 px-4 py-2 rounded-md transition">
|
||||
<i class="bi bi-box-arrow-right mr-2"></i> Logout
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
|
||||
<!-- Quick Tasks Section -->
|
||||
@@ -113,15 +119,19 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Logout Section -->
|
||||
<div class="mt-6 bg-white rounded-lg shadow-sm p-6">
|
||||
<h3 class="text-lg font-semibold text-gray-800 mb-4 flex items-center">
|
||||
<i class="bi bi-box-arrow-right text-red-500 mr-2"></i>
|
||||
Account
|
||||
<!-- Powered by Mainty Section -->
|
||||
<div class="mt-6 bg-white rounded-lg shadow-sm p-6 text-center">
|
||||
<h3 class="text-lg font-semibold text-gray-800 mb-2 flex items-center justify-center">
|
||||
<i class="bi bi-github text-gray-700 mr-2"></i>
|
||||
Powered by Mainty, a project by Michael Staake and the community.
|
||||
</h3>
|
||||
<a href="<?php echo url('/logout'); ?>"
|
||||
class="inline-block bg-red-100 hover:bg-red-200 text-red-700 px-6 py-2 rounded-md transition">
|
||||
<i class="bi bi-box-arrow-right"></i> Logout
|
||||
<p class="text-sm text-gray-600 mb-3">
|
||||
Get the latest version, learn more, or report issues on the official project GitHub.
|
||||
</p>
|
||||
<a href="https://github.com/michaelstaake/mainty" target="_blank" rel="noopener noreferrer"
|
||||
class="inline-flex items-center text-blue-600 hover:text-blue-800 font-medium">
|
||||
<i class="bi bi-box-arrow-up-right mr-1"></i>
|
||||
github.com/michaelstaake/mainty
|
||||
</a>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user