- ๐ญ Iโm currently working on https://github.com/k3nd0x/piglet
- ๐ฑ Iโm currently learning **Python Flask, FastAPI**
- ๐ฌ Ask me about **Linux System Administration, icinga2, grafana, bacula**
Simple Webapp to manage and administrate budgets in a household
Home Page: https://hub.docker.com/r/k3nd0x/piglet
License: GNU General Public License v3.0
- ๐ญ Iโm currently working on https://github.com/k3nd0x/piglet
- ๐ฑ Iโm currently learning **Python Flask, FastAPI**
- ๐ฌ Ask me about **Linux System Administration, icinga2, grafana, bacula**
Add a feature to store scheduled transaction which are added every month
Currently the app tries to send mails, although if no mailserver is configured. This should be changed
Tried logging in with the normal admin@localhost
user, but I can't get past the login screen. No error message or anything. The Docker logs says:
2023-09-20 12:32:25 piglet | INFO: Application startup complete.
2023-09-20 12:32:25 piglet | INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
2023-09-20 12:32:42 piglet | [2023-09-20 10:32:25] - Starting Piglet API...
2023-09-20 12:32:42 piglet | INFO: 127.0.0.1:50860 - "POST /admin/token HTTP/1.1" 200 OK
2023-09-20 12:32:42 piglet | INFO: 127.0.0.1:50872 - "GET /user/login-user HTTP/1.1" 200 OK
2023-09-20 12:32:42 piglet | INFO: 127.0.0.1:50874 - "GET /budget/ HTTP/1.1" 200 OK
2023-09-20 12:32:44 piglet | 2023-09-20 10:32:44,679 INFO success: piglet-redis entered RUNNING state, process has stayed up for > than 20 seconds (startsecs)
2023-09-20 12:32:44 piglet | 2023-09-20 10:32:44,682 INFO success: piglet-api entered RUNNING state, process has stayed up for > than 20 seconds (startsecs)
2023-09-20 12:32:44 piglet | 2023-09-20 10:32:44,684 INFO success: piglet-app entered RUNNING state, process has stayed up for > than 20 seconds (startsecs)
2023-09-20 12:33:44 piglet | INFO: 127.0.0.1:34508 - "POST /admin/token HTTP/1.1" 200 OK
2023-09-20 12:33:44 piglet | INFO: 127.0.0.1:34510 - "GET /user/login-user HTTP/1.1" 200 OK
2023-09-20 12:33:44 piglet | INFO: 127.0.0.1:34526 - "GET /budget/ HTTP/1.1" 200 OK
So it returns 200 OK on login user and trying to fetch /budget
but still no luck.
My docker-compose.yml
file:
version: '3.3'
services:
piglet:
restart: unless-stopped
container_name: piglet
depends_on:
- database
ports:
- 80:80 # Piglet
- 8080:8080 # API
image: k3nd0x/piglet:latest
environment:
DB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_HOST: ${MYSQL_HOST}
MYSQL_DATABASE: ${MYSQL_DATABASE}
TZ: ${TZ}
database:
image: mariadb:latest
container_name: piglet-db
ports:
- 3306:3306
volumes:
- ./database-data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
TZ: ${TZ}
My .env
file:
DB_ROOT_PASSWORD=[redacted]
MYSQL_PASSWORD=piglet
MYSQL_USER=piglet
MYSQL_DATABASE=piglet
MYSQL_HOST=database
TZ=Europe/Oslo
Hello,
Why are those separate ports? You can connect it only for port 80 and api is reachable on /api. This saves unnecessary setup, and will free some ports.
Hi everyone, here's my compose:
version: "3.8"
services:
piglet:
restart: unless-stopped
container_name: piglet
depends_on:
- database
ports:
- 8089:80
- 8087:8080
image: k3nd0x/piglet:latest
networks:
- shyDockerServer
environment:
DB_ROOT_PASSWORD: ${PIGLET_DB_ROOT_PASSWORD}
#MYSQL_DATABASE: ${MYSQL_DATABASE} # Default 'piglet'
#MYSQL_USER: ${MYSQL_USER} # Default 'piglet'
#MYSQL_PASSWORD: ${MYSQL_PASSWORD}
#MYSQL_HOST: ${MYSQL_HOST}
#MAIL_SERVER: ${MAIL_SERVER}
#MAIL_USER: ${MAIL_USER}
#MAIL_PASSWORD: ${MAIL_PASSWORD}
#MAIL_PORT: ${MAIL_PORT}
#MAIL_ENCRYPTIONPROTOCOL: ${MAIL_ENCRYPTIONPROTOCOL}
#DOMAIN: ${DOMAIN} # Default 'localhost'
#SECURE_COOKIE: ${SECURE_COOKIE}
volumes:
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
labels:
- swag=enable
- swag_auth=authelia
database:
image: mariadb:latest
container_name: piglet-db
volumes:
- ${DOCKERCONFDIR}/piglet/mysql:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${PIGLET_DB_ROOT_PASSWORD}
networks:
shyDockerServer:
driver: bridge
external: true
And here are the container logs:
2023-08-18 00:48:03,154 INFO Set uid to user 0 succeeded
2023-08-18 00:48:03,159 INFO supervisord started with pid 1
2023-08-18 00:48:04,162 INFO spawned: 'import_db' with pid 7
2023-08-18 00:48:04,165 INFO spawned: 'piglet-redis' with pid 8
2023-08-18 00:48:04,168 INFO spawned: 'piglet-api' with pid 9
2023-08-18 00:48:04,171 INFO spawned: 'piglet-app' with pid 10
2023-08-18 00:48:04,187 INFO success: import_db entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
[2023-08-18 00:48:04 +0200] [10] [INFO] Starting gunicorn 21.2.0
[2023-08-18 00:48:04 +0200] [10] [INFO] Listening at: http://0.0.0.0:80 (10)
[2023-08-18 00:48:04 +0200] [10] [INFO] Using worker: sync
[2023-08-18 00:48:04 +0200] [16] [INFO] Booting worker with pid: 16
INFO: Started server process [9]
INFO: Waiting for application startup.
2023-08-18 00:08:04 waiting for database host
2023-08-18 00:08:04 waiting for database host
2023-08-18 00:48:24,212 INFO success: piglet-redis entered RUNNING state, process has stayed up for > than 20 seconds (startsecs)
2023-08-18 00:48:24,214 INFO success: piglet-api entered RUNNING state, process has stayed up for > than 20 seconds (startsecs)
2023-08-18 00:48:24,214 INFO success: piglet-app entered RUNNING state, process has stayed up for > than 20 seconds (startsecs)
2023-08-18 00:08:04 waiting for database host
2023-08-18 00:08:04 waiting for database host
2023-08-18 00:08:04 waiting for database host
2023-08-18 00:08:04 waiting for database host
2023-08-18 00:08:04 waiting for database host
2023-08-18 00:08:04 waiting for database host
2023-08-18 00:08:04 waiting for database host
2023-08-18 00:08:04 waiting for database host
2023-08-18 00:08:04 waiting for database host
2023-08-18 00:08:04 waiting for database host
2023-08-14 12:11:09+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:11.0.2+maria~ubu2204 started.
2023-08-14 12:11:10+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2023-08-14 12:11:10+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:11.0.2+maria~ubu2204 started.
2023-08-14 12:11:12+00:00 [Note] [Entrypoint]: MariaDB upgrade not required
2023-08-14 12:11:12 0 [Note] Starting MariaDB 11.0.2-MariaDB-1:11.0.2+maria~ubu2204 source revision 0005f2f06c8e1aea4915887decad67885108a929 as process 1
2023-08-14 12:11:13 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2023-08-14 12:11:13 0 [Note] InnoDB: Number of transaction pools: 1
2023-08-14 12:11:13 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2023-08-14 12:11:13 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
2023-08-14 12:11:13 0 [Note] InnoDB: Using liburing
2023-08-14 12:11:13 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
2023-08-14 12:11:13 0 [Note] InnoDB: Completed initialization of buffer pool
2023-08-14 12:11:13 0 [Note] InnoDB: File system buffers for log disabled (block size=4096 bytes)
2023-08-14 12:11:14 0 [Note] InnoDB: Opened 3 undo tablespaces
2023-08-14 12:11:14 0 [Note] InnoDB: 128 rollback segments in 3 undo tablespaces are active.
2023-08-14 12:11:14 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
2023-08-14 12:11:14 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
2023-08-14 12:11:14 0 [Note] InnoDB: log sequence number 47897; transaction id 16
2023-08-14 12:11:14 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2023-08-14 12:11:14 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-08-14 12:11:14 0 [Note] Plugin 'wsrep-provider' is disabled.
2023-08-14 12:11:14 0 [Note] Server socket created on IP: '0.0.0.0'.
2023-08-14 12:11:14 0 [Note] Server socket created on IP: '::'.
2023-08-14 12:11:14 0 [Note] InnoDB: Buffer pool(s) load completed at 230814 12:11:14
2023-08-14 12:11:15 0 [Note] mariadbd: ready for connections.
Version: '11.0.2-MariaDB-1:11.0.2+maria~ubu2204' socket: '/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
Why doesn't the Piglet main container connect? I've basically used the default compose + some networking stuff.
Just getting this request in early enough :-)
Please implement the ability to import from Quicken. Without this, I cannot move my existing data and it doesn't make sense to start afresh to me
using original docker-compose file. logs show
Access denied for user 'piglet'@'%' to database '$DATABASE'
i have .env file in same folder as compose file. I am unable to login with default credentials.
The api calls should work over an python class in flask.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.