Plant-it
Plant-it is a self-hosted gardening companion app.
Useful for keeping track of plant care, receiving notifications about when to water plants, uploading plant images, and more.
Installing Plant-it is pretty straight forward, in order to do so follow these steps:
-
Create a folder where you want to place all Plant-it related files.
-
Inside that folder, create a file named
docker-compose.yml
with this content:name: plant-it services: server: image: msdeluise/plant-it-server:latest env_file: server.env depends_on: - db - cache restart: unless-stopped volumes: - "./upload-dir:/upload-dir" ports: - "8080:8080" - "3000:3000" db: image: mysql:8.0 restart: always env_file: server.env volumes: - "./db:/var/lib/mysql" cache: image: redis:7.2.1 restart: always
-
Inside that folder, create a file named
server.env
with this content:
#
# DB
#
MYSQL_HOST=db
MYSQL_PORT=3306
MYSQL_USERNAME=root
MYSQL_PSW=root
MYSQL_DATABASE=bootdb
MYSQL_ROOT_PASSWORD=root
#
# JWT
#
JWT_SECRET=putTheSecretHere
JWT_EXP=1
#
# Server config
#
USERS_LIMIT=-1
UPLOAD_DIR=/upload-dir
API_PORT=8080
FLORACODEX_KEY=
LOG_LEVEL=DEBUG
ALLOWED_ORIGINS=*
#
# Cache
#
CACHE_TTL=86400
CACHE_HOST=cache
CACHE_PORT=6379
- Run the docker compose file (
docker compose -f docker-compose.yml up -d
), then the service will be available atlocalhost:3000
, while the REST API will be available atlocalhost:8080/api
(localhost:8080/api/swagger-ui/index.html
for the documentation of them).
Take a look at the documentation in order to understand the available configurations.