mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Build source package in paperlessng_directory
Avoids permission problems in /tmp
This commit is contained in:
parent
be2013975c
commit
29ce2515ee
@ -45,7 +45,10 @@
|
||||
register: logs
|
||||
failed_when: "('Consuming ' + filename + '.txt') not in logs.content"
|
||||
|
||||
# assumes txt consumption finished by now, might have to sleep a bit
|
||||
- name: sleep 5 seconds
|
||||
pause:
|
||||
seconds: 5
|
||||
|
||||
- name: verify uploaded document has been consumed
|
||||
uri:
|
||||
url: "http://{{ paperlessng_listen_address }}:{{ paperlessng_listen_port }}/api/logs/"
|
||||
|
@ -1,5 +1,4 @@
|
||||
---
|
||||
# https://github.com/jonaswinkler/paperless-ng/blob/dev/.github/workflows/ci.yml
|
||||
- name: install dev dependencies
|
||||
apt:
|
||||
pkg:
|
||||
@ -7,9 +6,22 @@
|
||||
- npm
|
||||
- gettext
|
||||
|
||||
- name: create output directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
owner: "{{ paperlessng_system_user }}"
|
||||
group: "{{ paperlessng_system_group }}"
|
||||
mode: "750"
|
||||
with_items:
|
||||
- "{{ tempdir.path }}/paperless-ng"
|
||||
- "{{ tempdir.path }}/paperless-ng/scripts"
|
||||
|
||||
- block:
|
||||
- name: create temporary git directory
|
||||
tempfile:
|
||||
state: directory
|
||||
path: "{{ paperlessng_directory }}"
|
||||
register: gitdir
|
||||
|
||||
- name: pull paperless-ng
|
||||
@ -30,14 +42,6 @@
|
||||
- npm install
|
||||
- ./node_modules/.bin/ng build --prod
|
||||
|
||||
- name: create output directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ tempdir.path }}/paperless-ng"
|
||||
- "{{ tempdir.path }}/paperless-ng/scripts"
|
||||
|
||||
- name: copy application into place
|
||||
copy:
|
||||
src: "{{ gitdir.path }}/{{ item.src }}"
|
||||
@ -75,11 +79,13 @@
|
||||
args:
|
||||
chdir: "{{ gitdir.path }}"
|
||||
|
||||
- name: create paperlessng venv
|
||||
command:
|
||||
cmd: "python3 -m virtualenv {{ gitdir.path }}/.venv/ -p /usr/bin/python3"
|
||||
|
||||
- name: install paperlessng requirements
|
||||
pip:
|
||||
requirements: "{{ gitdir.path }}/requirements.txt"
|
||||
virtualenv: "{{ gitdir.path }}/.venv/"
|
||||
extra_args: --upgrade
|
||||
command:
|
||||
cmd: "{{ gitdir.path }}/.venv/bin/python3 -m pip install -r {{ gitdir.path }}/requirements.txt"
|
||||
|
||||
- name: compile messages
|
||||
command: "{{ gitdir.path }}/.venv/bin/python3 manage.py compilemessages"
|
||||
@ -100,3 +106,6 @@
|
||||
file:
|
||||
path: "{{ gitdir.path }}"
|
||||
state: absent
|
||||
|
||||
become: yes
|
||||
become_user: "{{ paperlessng_system_user }}"
|
||||
|
@ -190,9 +190,19 @@
|
||||
when: update_installation
|
||||
|
||||
- block:
|
||||
- name: create paperless-ng directory and set permissions
|
||||
file:
|
||||
path: "{{ paperlessng_directory }}"
|
||||
state: directory
|
||||
owner: "{{ paperlessng_system_user }}"
|
||||
group: "{{ paperlessng_system_group }}"
|
||||
mode: "750"
|
||||
- name: create temporary directory
|
||||
become: yes
|
||||
become_user: "{{ paperlessng_system_user }}"
|
||||
tempfile:
|
||||
state: directory
|
||||
path: "{{ paperlessng_directory }}"
|
||||
register: tempdir
|
||||
- name: check if version is available as release archive
|
||||
uri:
|
||||
@ -238,7 +248,6 @@
|
||||
group: "{{ paperlessng_system_group }}"
|
||||
mode: "750"
|
||||
with_items:
|
||||
- "{{ paperlessng_directory }}"
|
||||
- "{{ paperlessng_consumption_dir }}"
|
||||
- "{{ paperlessng_data_dir }}"
|
||||
- "{{ paperlessng_media_root }}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user