-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dd332eb
commit 0cf0a8b
Showing
18 changed files
with
101 additions
and
98 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
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
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,36 +1,32 @@ | ||
--- | ||
- name: Set up venv for pipenv to use. this is needed for the step below to work | ||
# without creating the venv in .venv, pipenv can't find the version | ||
# of python or pip to use, and errors out | ||
ansible.builtin.command: "python -m pipenv --python /usr/bin/python3.11" | ||
- name: Set up a virtual environment for this project | ||
ansible.builtin.command: "python3.11 -m venv .venv" | ||
args: | ||
chdir: "{{ project_root }}/current" | ||
changed_when: false | ||
|
||
- name: Install latest version of pipenv | ||
ansible.builtin.pip: | ||
name: pipenv | ||
virtualenv: "{{ project_root }}/current/.venv" | ||
|
||
- name: Install python dependencies with pipenv | ||
ansible.builtin.command: "python -m pipenv sync" # noqa no-changed-when | ||
- name: Install python dependencies with uv | ||
ansible.builtin.shell: | | ||
source .venv/bin/activate | ||
python3.11 -m pip install -r requirements/requirements.linux.generated.txt | ||
args: | ||
chdir: "{{ project_root }}/current" | ||
environment: | ||
# make sure we install in the project root. | ||
# this way when we clear up old releases we also | ||
# remove the deps. | ||
# using env vars triggers the 'schema[playbook]', hence the noqa | ||
PIPENV_VENV_IN_PROJECT: "1" # noqa schema[playbook] | ||
executable: "/usr/bin/bash" | ||
|
||
- name: Update node deps for building tailwind | ||
ansible.builtin.command: "python -m pipenv run ./manage.py tailwind update" | ||
ansible.builtin.shell: | | ||
source .venv/bin/activate | ||
dotenv run -- python3.11 ./manage.py tailwind update | ||
args: | ||
chdir: "{{ project_root }}/current" | ||
executable: "/usr/bin/bash" | ||
when: update_front_end_deps is true | ||
|
||
- name: Install node deps for building tailwind | ||
ansible.builtin.command: "python -m pipenv run ./manage.py tailwind install" | ||
ansible.builtin.shell: | | ||
source .venv/bin/activate | ||
dotenv run -- python3.11 ./manage.py tailwind install | ||
args: | ||
executable: "/usr/bin/bash" | ||
chdir: "{{ project_root }}/current" | ||
changed_when: false |
This file was deleted.
Oops, something went wrong.
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,12 +1,15 @@ | ||
--- | ||
- name: Deploy the TGWF django admin | ||
hosts: | ||
- all | ||
remote_user: "deploy" | ||
become: no | ||
- name: Deploy the TGWF django admin | ||
hosts: | ||
- all | ||
remote_user: "deploy" | ||
become: no | ||
|
||
tasks: | ||
- name: run migration | ||
shell: "pipenv run ./manage.py migrate" | ||
args: | ||
chdir: "{{ project_root }}/current" | ||
tasks: | ||
- name: run migration | ||
shell: | | ||
source .venv/bin/activate | ||
dotenv run -- ./manage.py migrate | ||
args: | ||
chdir: "{{ project_root }}/current" | ||
executable: "/usr/bin/bash" |
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
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,4 +1,9 @@ | ||
# supervisor can only control processes it started itself. | ||
# So we need to use exec to replace the parent shell script process | ||
# that starts pipenv | ||
exec dotenv run -- gunicorn greenweb.wsgi -b {{ internal_ip }}:{{ gunicorn_port }} -t 300 -c gunicorn.conf.py --statsd-host=10.0.0.2:9125 --statsd-prefix=member.app | ||
# that calls gunicorn | ||
source .venv/bin/activate | ||
dotenv run -- gunicorn greenweb.wsgi \ | ||
--bind {{ internal_ip }}:{{ gunicorn_port }} \ | ||
--timeout 300 \ | ||
--config gunicorn.conf.py \ | ||
--statsd-host=10.0.0.2:9125 --statsd-prefix=member.app |
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,4 +1,8 @@ | ||
# supervisor can only control processes it started itself. | ||
# So we need to use exec to replace the parent shell script process | ||
# that starts pipenv | ||
exec python -m pipenv run ./manage.py rundramatiq --threads {{ dramatiq_threads }} --processes {{ dramatiq_processes }} --queues default | ||
# that calls manage.py | ||
source .venv/bin/activate | ||
exec dotenv run -- ./manage.py rundramatiq \ | ||
--threads {{ dramatiq_threads }} \ | ||
--processes {{ dramatiq_processes }} \ | ||
--queues default |
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
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 |
---|---|---|
|
@@ -6,10 +6,10 @@ venv: | |
|
||
## Installing | ||
release: | ||
PIPENV_DOTENV_LOCATION=.env.prod pipenv run sentry-cli releases new -p admin-portal $(shell sentry-cli releases propose-version) | ||
PIPENV_DOTENV_LOCATION=.env.prod pipenv run sentry-cli releases set-commits --auto $(shell sentry-cli releases propose-version) | ||
PIPENV_DOTENV_LOCATION=.env.prod pipenv run ansible-playbook ansible/deploy.yml -i ansible/inventories/prod.yml | ||
PIPENV_DOTENV_LOCATION=.env.prod pipenv run sentry-cli releases finalize $(shell sentry-cli releases propose-version) | ||
dotenv -f env.prod run -- sentry-cli releases new -p admin-portal $(shell sentry-cli releases propose-version) | ||
dotenv -f env.prod run -- sentry-cli releases set-commits --auto $(shell sentry-cli releases propose-version) | ||
dotenv -f env.prod run -- ansible-playbook ansible/deploy.yml -i ansible/inventories/prod.yml | ||
dotenv -f env.prod run -- sentry-cli releases finalize $(shell sentry-cli releases propose-version) | ||
|
||
dev.createsuperuser: | ||
python ./manage.py createsuperuser --username admin --email [email protected] --noinput | ||
|
@@ -52,16 +52,6 @@ test: | |
test.only: | ||
pytest -s --create-db -m only -v --ds=greenweb.settings.testing | ||
|
||
flake: | ||
flake8 ./greenweb ./apps ./*.py --count --statistics | ||
black: | ||
black ./greenweb ./apps ./*.py $(ARGS) | ||
|
||
black.check: | ||
@ARGS="--check --color --diff" make black | ||
|
||
ci: | black.check flake | ||
|
||
# Build the documentation using Sphinx | ||
docs: | ||
sphinx-build ./docs _build/ | ||
|
This file was deleted.
Oops, something went wrong.