added linting automation. Fixed nginx config as file name was wrong and as such didn't get loaded.
All checks were successful
Gitea Test. / tests (push) Successful in 49s
All checks were successful
Gitea Test. / tests (push) Successful in 49s
This commit is contained in:
4
Makefile
4
Makefile
@@ -26,3 +26,7 @@ dev_restart_with_logs:
|
||||
test:
|
||||
docker compose --env-file .env.template -f ./compose.yaml -f ./.docker-compose-files/compose.test.yaml up --build --abort-on-container-exit --exit-code-from web
|
||||
|
||||
lint:
|
||||
docker compose exec web ruff check
|
||||
docker compose exec web mypy .
|
||||
|
||||
|
||||
46
compose.yaml
46
compose.yaml
@@ -1,3 +1,4 @@
|
||||
---
|
||||
services:
|
||||
web:
|
||||
build: .
|
||||
@@ -5,47 +6,33 @@ services:
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
environment:
|
||||
ALLOWED_HOSTS: ${NGINX_HOSTNAME}
|
||||
DJANGO_SETTINGS_MODULE: ${DJANGO_SETTINGS_MODULE}
|
||||
VIRTUAL_HOST: localhost
|
||||
# VIRTUAL_HOST: localhost
|
||||
# VIRTUAL_PORT: 8000
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- static_volume:/app/static
|
||||
- media_volume:/app/media
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
|
||||
|
||||
volumes: [static_volume:/app/static, media_volume:/app/media]
|
||||
networks: [frontend, backend]
|
||||
db:
|
||||
image: postgres:18
|
||||
environment:
|
||||
POSTGRES_DB: ${POSTGRES_DBNAME}
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql
|
||||
volumes: [postgres_data:/var/lib/postgresql]
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DBNAME}"]
|
||||
test: [CMD-SHELL, 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DBNAME}']
|
||||
interval: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- backend
|
||||
|
||||
networks: [backend]
|
||||
adminer:
|
||||
image: adminer
|
||||
depends_on:
|
||||
- db
|
||||
depends_on: [db]
|
||||
restart: always
|
||||
ports:
|
||||
- 127.0.0.1:8080:8080
|
||||
networks:
|
||||
- backend
|
||||
|
||||
ports: [127.0.0.1:8080:8080]
|
||||
networks: [backend]
|
||||
proxy:
|
||||
image: nginx:stable
|
||||
volumes:
|
||||
@@ -53,22 +40,17 @@ services:
|
||||
- static_volume:/app/static:ro
|
||||
- media_volume:/app/media:ro
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
ports: [80:80, 443:443]
|
||||
environment:
|
||||
- NGINX_HOSTNAME=${NGINX_HOSTNAME}
|
||||
- NGINX_PORT=80
|
||||
- NGINX_SSL_PORT=443
|
||||
depends_on:
|
||||
- web
|
||||
networks:
|
||||
- frontend
|
||||
|
||||
depends_on: [web]
|
||||
networks: [frontend]
|
||||
networks:
|
||||
frontend:
|
||||
backend:
|
||||
|
||||
internal: true
|
||||
volumes:
|
||||
postgres_data:
|
||||
static_volume:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!doctype html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
Reference in New Issue
Block a user