-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add make and docker-compose for local paperless instance
- Loading branch information
Showing
4 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,22 @@ | ||
# paperless-cli | ||
CLI tool to interact with paperless-ngx remote API | ||
|
||
|
||
## Development | ||
|
||
### Requirements | ||
|
||
- go | ||
- docker | ||
- docker-compose (if running local test instance of paperless-ngx) | ||
- goreleaser (if building deb/rpm packages locally) | ||
|
||
### Build | ||
|
||
Run `go run . --help` to directly invoke the CLI for testing purposes. | ||
Run `make help` to see a list of available targets. | ||
|
||
Commonly used: | ||
|
||
- `make build`: Build the project | ||
- `make local-install`: Start paperless-ngx in docker-compose (`http://localhost:8008`, user `admin:admin`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# docker-compose file for running paperless from the Docker Hub. | ||
# This file contains everything paperless needs to run. | ||
# Paperless supports amd64, arm and arm64 hardware. | ||
# | ||
# All compose files of paperless configure paperless in the following way: | ||
# | ||
# - Paperless is (re)started on system boot, if it was running before shutdown. | ||
# - Docker volumes for storing data are managed by Docker. | ||
# - Folders for importing and exporting files are created in the same directory | ||
# as this file and mounted to the correct folders inside the container. | ||
# - Paperless listens on port 8000. | ||
# | ||
# SQLite is used as the database. The SQLite file is stored in the data volume. | ||
# | ||
# To install and update paperless with this file, do the following: | ||
# | ||
# - Copy this file as 'docker-compose.yml' and the files 'docker-compose.env' | ||
# and '.env' into a folder. | ||
# - Run 'docker-compose pull'. | ||
# - Run 'docker-compose run --rm webserver createsuperuser' to create a user. | ||
# - Run 'docker-compose up -d'. | ||
# | ||
# For more extensive installation and update instructions, refer to the | ||
# documentation. | ||
|
||
version: "3.4" | ||
services: | ||
broker: | ||
image: docker.io/library/redis:7 | ||
restart: unless-stopped | ||
volumes: | ||
- redisdata:/data | ||
|
||
webserver: | ||
image: ghcr.io/paperless-ngx/paperless-ngx:latest | ||
restart: unless-stopped | ||
depends_on: | ||
- broker | ||
ports: | ||
- "8008:8000" | ||
environment: | ||
PAPERLESS_REDIS: redis://broker:6379 | ||
PAPERLESS_ADMIN_USER: admin | ||
PAPERLESS_ADMIN_PASSWORD: admin | ||
|
||
volumes: | ||
redisdata: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
compose_file = test/docker-compose.yml | ||
compose_project = paperless-cli | ||
|
||
clean_targets += local-uninstall | ||
|
||
.PHONY: local-install | ||
local-install: ## Install paperless-ngx in docker-compose | ||
docker-compose -f $(compose_file) -p $(compose_project) up -d | ||
|
||
.PHONY: local-uninstall | ||
local-uninstall: ## Uninstall paperless-ngx in docker-compose | ||
docker-compose -f $(compose_file) -p $(compose_project) rm --force --stop -v |