Update deployment config

This commit is contained in:
Matthew Northcott 2023-03-28 13:00:15 +13:00
parent 5990144005
commit c8851d552f
5 changed files with 23 additions and 18 deletions

View file

@ -1,9 +1,14 @@
LINZ_API_KEY=myapikey
POSTGRES_DB=postgres
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
DATABASE_NAME=righttree
DATABASE_USER=righttree
DATABASE_PASSWORD=righttree
DATABASE_HOST=postgres
CELERY_BROKER_URL=redis://redis:6379/0
BASE_URL=localhost:8000
REDIS_HOST=redis
REDIS_PASSWORD=redis
DJANGO_SECRET_KEY=changeme
DJANGO_DEBUG_MODE=True
STRIPE_API_KEY=sk_test_key
STRIPE_PRICE_ID=price_priceid

View file

@ -9,6 +9,8 @@ x-django: &django
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
env_file: .env
user: "$UID:$GID"
restart: always
@ -31,10 +33,10 @@ services:
depends_on:
- backend
volumes:
- ./nginx.production.conf:/etc/nginx/nginx.conf
- ./backend/right_tree/staticfiles:/etc/nginx/html/staticfiles
- ./frontend/build:/etc/nginx/html/build
- /etc/letsencrypt:/etc/letsencrypt
- ./nginx.production.conf:/etc/nginx/nginx.conf:ro
- ./backend/right_tree/staticfiles:/etc/nginx/html/staticfiles:ro
- ./frontend/build:/etc/nginx/html/build:ro
- /etc/letsencrypt:/etc/letsencrypt:ro
ports:
- "80:80"
- "443:443"
@ -45,9 +47,8 @@ services:
container_name: postgres
volumes:
- righttree-postgres-data:/var/lib/postgresql/data
- ./create_database.sql:/docker-entrypoint-initdb.d/create_database.sql
ports:
- "5432:5432"
expose:
- "5432"
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}

View file

@ -9,6 +9,8 @@ x-django: &django
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- ./backend:/app
env_file: .env

View file

@ -28,9 +28,5 @@ http {
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location ~* \.(eot|otf|ttf|woff|woff2)$ {
add_header Access-Control-Allow-Origin *;
}
}
}

View file

@ -4,6 +4,7 @@ http {
server_name _;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
index index.html;