Skip to content

Commit 4ee8458

Browse files
Merge branch 'main' into develop
2 parents 8067891 + 76e944b commit 4ee8458

File tree

3 files changed

+14
-139
lines changed

3 files changed

+14
-139
lines changed

.env.example

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,9 @@ DATABASE_URL=sqlite:///subscriptions.db
99

1010
# Option 2: PostgreSQL
1111
# DATABASE_URL=postgresql://subscription_tracker:subscription_tracker@postgres:5432/subscription_tracker
12-
# POSTGRES_DB=subscription_tracker
13-
# POSTGRES_USER=subscription_tracker
14-
# POSTGRES_PASSWORD=subscription_tracker
15-
# POSTGRES_PORT=5432
1612

1713
# Option 3: MariaDB/MySQL
1814
# DATABASE_URL=mysql+pymysql://subscription_tracker:subscription_tracker@mariadb:3306/subscription_tracker
19-
# MYSQL_DATABASE=subscription_tracker
20-
# MYSQL_USER=subscription_tracker
21-
# MYSQL_PASSWORD=subscription_tracker
22-
# MYSQL_ROOT_PASSWORD=root_password
23-
# MYSQL_PORT=3306
2415

2516
# Email Configuration (SMTP)
2617
MAIL_SERVER=smtp.gmail.com

README.md

Lines changed: 13 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -102,62 +102,6 @@ The application supports three database backends:
102102
- **PostgreSQL** - Robust relational database, recommended for production
103103
- **MariaDB/MySQL** - Popular relational database alternative
104104

105-
### Quick Start (SQLite)
106-
107-
1. **Clone the repository or use docker-compose:**
108-
```bash
109-
docker-compose up -d
110-
```
111-
112-
2. **Access the application:**
113-
- Navigate to `http://localhost:5000`
114-
- Default admin credentials: `admin` / `changeme`
115-
- **⚠️ Change the default password immediately!**
116-
117-
### Using PostgreSQL
118-
119-
1. **Create environment file:**
120-
```bash
121-
cp .env.example .env
122-
```
123-
124-
2. **Configure PostgreSQL in .env:**
125-
```env
126-
# Uncomment and configure these lines in .env
127-
DATABASE_URL=postgresql://subscription_tracker:your_password@postgres:5432/subscription_tracker
128-
POSTGRES_DB=subscription_tracker
129-
POSTGRES_USER=subscription_tracker
130-
POSTGRES_PASSWORD=your_secure_password
131-
POSTGRES_PORT=5432
132-
```
133-
134-
3. **Run with PostgreSQL:**
135-
```bash
136-
docker-compose --profile postgres up -d
137-
```
138-
139-
### Using MariaDB
140-
141-
1. **Create environment file:**
142-
```bash
143-
cp .env.example .env
144-
```
145-
146-
2. **Configure MariaDB in .env:**
147-
```env
148-
# Uncomment and configure these lines in .env
149-
DATABASE_URL=mysql+pymysql://subscription_tracker:your_password@mariadb:3306/subscription_tracker
150-
MYSQL_DATABASE=subscription_tracker
151-
MYSQL_USER=subscription_tracker
152-
MYSQL_PASSWORD=your_secure_password
153-
MYSQL_ROOT_PASSWORD=your_root_password
154-
MYSQL_PORT=3306
155-
```
156-
157-
3. **Run with MariaDB:**
158-
```bash
159-
docker-compose --profile mariadb up -d
160-
```
161105

162106
### Using Docker Compose (Manual Configuration)
163107
```yaml
@@ -243,6 +187,18 @@ All of these are optional, though it is advised to use the SECRET_KEY and the MA
243187
| `PUID` | Host user ID to run the app process as (for mounted volume ownership) | 1000 |
244188
| `PGID` | Host group ID to run the app process as | 1000 |
245189

190+
#### Database URL Examples
191+
```bash
192+
# SQLite (default)
193+
DATABASE_URL=sqlite:///subscriptions.db
194+
195+
# PostgreSQL
196+
DATABASE_URL=postgresql://username:password@postgres:5432/database_name
197+
198+
# MariaDB/MySQL
199+
DATABASE_URL=mysql+pymysql://username:password@mariadb:3306/database_name
200+
```
201+
246202
#### Email Configuration Variables
247203
| Variable | Description | Default |
248204
|----------|-------------|---------|
@@ -259,34 +215,6 @@ All of these are optional, though it is advised to use the SECRET_KEY and the MA
259215
| `CURRENCY_REFRESH_MINUTES` | Freshness window for cached exchange rates (per provider) | 1440 (24h) |
260216
| `CURRENCY_PROVIDER_PRIORITY` | Comma list controlling provider fallback order | frankfurter,floatrates,erapi_open |
261217

262-
#### PostgreSQL Database Variables
263-
| Variable | Description | Default |
264-
|----------|-------------|---------|
265-
| `POSTGRES_DB` | PostgreSQL database name | subscription_tracker |
266-
| `POSTGRES_USER` | PostgreSQL username | subscription_tracker |
267-
| `POSTGRES_PASSWORD` | PostgreSQL password | subscription_tracker |
268-
| `POSTGRES_PORT` | PostgreSQL port | 5432 |
269-
270-
#### MariaDB/MySQL Database Variables
271-
| Variable | Description | Default |
272-
|----------|-------------|---------|
273-
| `MYSQL_DATABASE` | MySQL/MariaDB database name | subscription_tracker |
274-
| `MYSQL_USER` | MySQL/MariaDB username | subscription_tracker |
275-
| `MYSQL_PASSWORD` | MySQL/MariaDB password | subscription_tracker |
276-
| `MYSQL_ROOT_PASSWORD` | MySQL/MariaDB root password | root_password |
277-
| `MYSQL_PORT` | MySQL/MariaDB port | 3306 |
278-
279-
#### Database URL Examples
280-
```bash
281-
# SQLite (default)
282-
DATABASE_URL=sqlite:///subscriptions.db
283-
284-
# PostgreSQL
285-
DATABASE_URL=postgresql://username:password@postgres:5432/database_name
286-
287-
# MariaDB/MySQL
288-
DATABASE_URL=mysql+pymysql://username:password@mariadb:3306/database_name
289-
```
290218

291219
### Exchange Rate Providers
292220

@@ -609,3 +537,4 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
609537

610538

611539

540+

docker-compose.yml

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -22,56 +22,11 @@ services:
2222
- CURRENCY_PROVIDER_PRIORITY=${CURRENCY_PROVIDER_PRIORITY:-frankfurter,floatrates,erapi_open}
2323
- PERFORMANCE_LOGGING=${PERFORMANCE_LOGGING:-true}
2424
volumes:
25-
- ./data:/app/instance
25+
- YOURDATAVOLUME:/app/instance
2626
healthcheck:
2727
test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
2828
interval: 30s
2929
timeout: 10s
3030
retries: 3
3131
start_period: 40s
3232
restart: unless-stopped
33-
34-
postgres:
35-
image: postgres:15-alpine
36-
environment:
37-
- POSTGRES_DB=${POSTGRES_DB:-subscription_tracker}
38-
- POSTGRES_USER=${POSTGRES_USER:-subscription_tracker}
39-
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-subscription_tracker}
40-
volumes:
41-
- postgres_data:/var/lib/postgresql/data
42-
ports:
43-
- "${POSTGRES_PORT:-5432}:5432"
44-
healthcheck:
45-
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-subscription_tracker} -d ${POSTGRES_DB:-subscription_tracker}"]
46-
interval: 10s
47-
timeout: 5s
48-
retries: 5
49-
start_period: 30s
50-
profiles:
51-
- postgres
52-
restart: unless-stopped
53-
54-
mariadb:
55-
image: mariadb:10.11
56-
environment:
57-
- MYSQL_DATABASE=${MYSQL_DATABASE:-subscription_tracker}
58-
- MYSQL_USER=${MYSQL_USER:-subscription_tracker}
59-
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-subscription_tracker}
60-
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-root_password}
61-
volumes:
62-
- mariadb_data:/var/lib/mysql
63-
ports:
64-
- "${MYSQL_PORT:-3306}:3306"
65-
healthcheck:
66-
test: ["CMD", "/usr/local/bin/healthcheck.sh", "--connect", "--innodb_initialized"]
67-
interval: 10s
68-
timeout: 5s
69-
retries: 5
70-
start_period: 30s
71-
profiles:
72-
- mariadb
73-
restart: unless-stopped
74-
75-
volumes:
76-
postgres_data:
77-
mariadb_data:

0 commit comments

Comments
 (0)