Skip to content

Commit

Permalink
Fixing filename issue
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Nov 17, 2024
1 parent e9e400c commit 435f5bf
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-base-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ name: Build Base Image
on:
push:
paths:
- 'Dockerfile.base'
- 'Base.Dockerfile'
- 'requirements.txt'
- 'package.json'
- 'package-lock.json'
- '.github/workflows/build-base-image.yml'

concurrency:
group: deployment
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ on:
- completed

push:
paths:
- '.github/workflows/build-image.yml'
paths-ignore:
- '.github/**'
- 'seeds/**'
Expand Down Expand Up @@ -50,6 +48,14 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set environment variables from .env-prod
id: env-vars
run: |
set -a
source .env-prod
set +a
echo "::set-output name=env_vars::$(cat .env-prod | grep -v '^#' | xargs)"
- name: Authenticate with GitHub Container Registry
uses: docker/login-action@v2
with:
Expand All @@ -62,4 +68,5 @@ jobs:
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}/${{ env.SERVICE }}:${{ github.sha }}
tags: ghcr.io/${{ github.repository }}/${{ env.SERVICE }}:${{ github.sha }}
build-args: ${{ steps.env-vars.outputs.env_vars }}
4 changes: 2 additions & 2 deletions crank/settings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

# you need to set "myproject = 'prod'" as an environment variable
# in your OS (on which your website is hosted)
if os.environ['ENV'] == 'prod':
if os.environ.get('ENV') == 'prod':
from .prod import *
elif os.environ['ENV'] == 'staging':
elif os.environ.get('ENV') == 'staging':
from .staging import *
else:
from .dev import *
2 changes: 1 addition & 1 deletion crank/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
# Set session timeout to 30 minutes
SESSION_COOKIE_AGE = 1800 # 30 minutes in seconds

CACHE_MIDDLEWARE_SECONDS = int(os.environ["CACHE_TTL"]) # Timeout for cached items in seconds
CACHE_MIDDLEWARE_SECONDS = os.environ.get("CACHE_TTL", 60) # Timeout for cached items in seconds
REDIS_MASTER_URL = os.environ.get("REDIS_MASTER_URL", "redis://redis-master:6379/0")

# Optional: To use Redis for session storage
Expand Down
2 changes: 1 addition & 1 deletion crank/settings/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

BASE_DIR = Path(__file__).resolve().parent.parent.parent
DEBUG = True
SECRET_KEY = os.environ["SECRET_KEY"]
SECRET_KEY = os.environ.get("SECRET_KEY")
CPU_COUNT = multiprocessing.cpu_count()

DATABASES = {
Expand Down

0 comments on commit 435f5bf

Please sign in to comment.