Skip to content

Commit

Permalink
Merge pull request #256 from ItsCalebJones/bump_ll
Browse files Browse the repository at this point in the history
fix(library): bump ll library
  • Loading branch information
ItsCalebJones authored Aug 11, 2024
2 parents a1e062e + f232f44 commit 348c78f
Show file tree
Hide file tree
Showing 11 changed files with 565 additions and 485 deletions.
2 changes: 1 addition & 1 deletion .github/actions/python-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ runs:
- name: Run Test Suite
shell: bash
run: |
docker-compose -f docker/docker-compose.test.yml run test
docker compose -f docker/docker-compose.test.yml run test
- name: Upload Coverage Data
if: inputs.upload-coverage
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=v3.1.1
Expand Down
7 changes: 5 additions & 2 deletions .github/actions/setup-poetry/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ inputs:
description: >
Version range or exact version of a Python version to use, using SemVer's version range syntax.
required: false
default: 3.10.4
default: 3.12.4
repo_username:
description: TSD pypi username
required: true
repo_password:
description: TSD pypi password
required: true


outputs:
python-version:
description: The installed python version. Useful when given a version range as input.
Expand All @@ -24,6 +23,10 @@ outputs:
runs:
using: composite
steps:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ inputs.python-version }}
- name: Install poetry
shell: bash
run: curl -sSL https://install.python-poetry.org | python3 - --version 1.8.3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: '3.10.4'
python-version: '3.12.4'

- name: Python Semantic Release
uses: python-semantic-release/[email protected]
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ shell: ## Run Django shell_plus
.PHONY: build
build: ## Run local tests using Docker
@echo "🚀 Building Docker container..."
@docker-compose -f docker/docker-compose.yml build
@docker compose -f docker/docker-compose.yml build

.PHONY: test
test: build ## Run local tests using Docker
@echo "🚀 Running local tests"
@docker-compose -f docker/docker-compose.test.yml run test
@docker compose -f docker/docker-compose.test.yml run test

.PHONY: local-test
local-test: ## Run Django tests locally
Expand All @@ -38,7 +38,7 @@ local-run: ## Run Django app locally
.PHONY: docker-run
docker-run: build ## Run local instance using Docker
@echo "🚀 Running local instance"
@docker-compose -f docker/docker-compose.stack.yml up -d
@docker compose -f docker/docker-compose.stack.yml up -d

.PHONY: help
help: ## Display available make commands
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Backend services and current web front end for Space Launch Now.
1. Install [Poetry](https://python-poetry.org/docs/#installing-with-the-official-installer)
2. Install python venv - `poetry install --with dev`
3. Setup pre-commit - `poetry run pre-commit install`
4. Run locally via `docker-compose` in `/docker`
4. Run locally via `docker compose` in `/docker`

## Authors

Expand Down
8 changes: 4 additions & 4 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
c# Running LL via Docker

## Run Test
1) Run `docker-compose -f docker-compose.test.yml build`
2) Run `docker-compose -f docker-compose.test.yml run --rm test`
1) Run `docker compose -f docker-compose.test.yml build`
2) Run `docker compose -f docker-compose.test.yml run --rm test`

## Run LL Locally

1) Copy `.env.example` to `.env` and fill it in with required secrets in `spacelaunchnow/settings`
2) Run `docker-compose up`
2) Run `docker compose up`
3) Open a browser to `http://localhost:8080/`

### Restore Database
**Example**
`docker exec -i sln_db pg_restore -U spacelaunchnow_prod_user -v -d sln_db < spacelaunchnow.backup &> restore.log`

## Run full stack locally
Run `docker-compose -f docker-compose.stack.yml up -d --build`
Run `docker compose -f docker-compose.stack.yml up -d --build`
Then either attach to the running LL image or connect via browser.
1 change: 1 addition & 0 deletions k8s/helm/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ env:
EMAIL_PORT: "587"
EMAIL_HOST_TLS: "True"
SLN_ENVIRONMENT: "production"
HOST_NAME: "spacelaunchnow.me"

worker:
IS_WEBSERVER: "False"
Expand Down
1 change: 1 addition & 0 deletions k8s/helm/values-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ env:
ENABLE_SILKY: "True"
SILKY_INTERCEPT_PERCENT: "100"
SILKY_ANALYZE_QUERIES: "False"
HOST_NAME: "staging.spacelaunchnow.me"

worker:
IS_WEBSERVER: "False"
Expand Down
1,015 changes: 544 additions & 471 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ django-cachalot = "^2.6.1"
django-compat = "==1.0.15"
django-cors-headers = "==3.13.0"
django-cleanup = "==6.0.0"
django-debug-toolbar = "==3.6.0"
django-debug-toolbar = "==4.4.6"
django-embed-video = "==1.4.5"
django-extensions = "==3.2.0"
django-filter = "==2.4.0"
Expand Down Expand Up @@ -57,7 +57,7 @@ sorl-thumbnail-serializer-field = "==0.2.1"
python-semantic-release = "7.34.6"
twitter = "==1.18.0"
tzlocal = "==4.2"
django-launch-library = {version = "^19.5.7", source = "tsd"}
django-launch-library = {version = "^19.14.1", source = "tsd"}
environs = "^9.5.0"
django-jet-reboot = "^1.3.3"
pymemcache = "^4.0.0"
Expand Down
2 changes: 2 additions & 0 deletions src/spacelaunchnow/settings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,8 @@
"debug_toolbar.W006", # See jazzband/django-debug-toolbar#1780
]

HOST_NAME = env.str("HOST_NAME", "localhost")

# Django Silky Settings
# ref: https://github.com/jazzband/django-silk
SILKY_ENABLED = env.bool("ENABLE_SILKY", False)
Expand Down

0 comments on commit 348c78f

Please sign in to comment.