Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: move the application directory up a level #2156

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dockerComposeFile": ["../compose.yml"],
"service": "dev",
"runServices": ["dev", "docs", "server"],
"workspaceFolder": "/home/calitp/app",
"workspaceFolder": "/calitp/app",
"postStartCommand": ["/bin/bash", "bin/reset_db.sh"],
"postAttachCommand": ["/bin/bash", ".devcontainer/postAttach.sh"],
"customizations": {
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/postAttach.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ set -eu

# initialize pre-commit

git config --global --add safe.directory /home/calitp/app
git config --global --add safe.directory /calitp/app
pre-commit install --overwrite
2 changes: 1 addition & 1 deletion appcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN python -m pip install --upgrade pip

# overwrite default nginx.conf
COPY appcontainer/nginx.conf /etc/nginx/nginx.conf
COPY appcontainer/proxy.conf /home/calitp/run/proxy.conf
COPY appcontainer/proxy.conf /calitp/run/proxy.conf

# copy source files
COPY manage.py manage.py
Expand Down
8 changes: 4 additions & 4 deletions appcontainer/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ http {
upstream app_server {
# fail_timeout=0 means we always retry an upstream even if it failed
# to return a good HTTP response
server unix:/home/calitp/run/gunicorn.sock fail_timeout=0;
server unix:/calitp/run/gunicorn.sock fail_timeout=0;
}

# maps $binary_ip_address to $limit variable if request is of type POST
Expand Down Expand Up @@ -67,7 +67,7 @@ http {

# path for static files
location /static/ {
alias /home/calitp/app/static/;
alias /calitp/app/static/;
expires 1y;
add_header Cache-Control public;
}
Expand All @@ -81,12 +81,12 @@ http {
# case-insensitive regex matches path
location ~* ^/(eligibility/confirm)$ {
limit_req zone=rate_limit;
include /home/calitp/run/proxy.conf;
include /calitp/run/proxy.conf;
}

# app path
location @proxy_to_app {
include /home/calitp/run/proxy.conf;
include /calitp/run/proxy.conf;
}
}
}
4 changes: 2 additions & 2 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
ports:
- "${DJANGO_LOCAL_PORT:-8000}:8000"
volumes:
- ./:/home/calitp/app
- ./:/calitp/app

docs:
image: benefits_client:dev
Expand All @@ -32,7 +32,7 @@ services:
ports:
- "8001"
volumes:
- ./:/home/calitp/app
- ./:/calitp/app

server:
image: ghcr.io/cal-itp/eligibility-server:dev
Expand Down
2 changes: 1 addition & 1 deletion terraform/app_service.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ resource "azurerm_service_plan" "main" {
}

locals {
data_mount = "/home/calitp/app/data"
data_mount = "/calitp/app/data"
}

resource "azurerm_linux_web_app" "main" {
Expand Down
Loading