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:
|
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
|
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 .
|
||||||
|
|
||||||
|
|||||||
48
compose.yaml
48
compose.yaml
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
services:
|
services:
|
||||||
web:
|
web:
|
||||||
build: .
|
build: .
|
||||||
@@ -5,47 +6,33 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
ALLOWED_HOSTS: ${NGINX_HOSTNAME}
|
ALLOWED_HOSTS: ${NGINX_HOSTNAME}
|
||||||
DJANGO_SETTINGS_MODULE: ${DJANGO_SETTINGS_MODULE}
|
DJANGO_SETTINGS_MODULE: ${DJANGO_SETTINGS_MODULE}
|
||||||
VIRTUAL_HOST: localhost
|
# VIRTUAL_HOST: localhost
|
||||||
#VIRTUAL_PORT: 8000
|
# VIRTUAL_PORT: 8000
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes: [static_volume:/app/static, media_volume:/app/media]
|
||||||
- static_volume:/app/static
|
networks: [frontend, backend]
|
||||||
- media_volume:/app/media
|
|
||||||
networks:
|
|
||||||
- frontend
|
|
||||||
- backend
|
|
||||||
|
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: postgres:18
|
image: postgres:18
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_DB: ${POSTGRES_DBNAME}
|
POSTGRES_DB: ${POSTGRES_DBNAME}
|
||||||
POSTGRES_USER: ${POSTGRES_USER}
|
POSTGRES_USER: ${POSTGRES_USER}
|
||||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||||
volumes:
|
volumes: [postgres_data:/var/lib/postgresql]
|
||||||
- postgres_data:/var/lib/postgresql
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
healthcheck:
|
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
|
interval: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
networks:
|
networks: [backend]
|
||||||
- backend
|
|
||||||
|
|
||||||
adminer:
|
adminer:
|
||||||
image: adminer
|
image: adminer
|
||||||
depends_on:
|
depends_on: [db]
|
||||||
- db
|
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports: [127.0.0.1:8080:8080]
|
||||||
- 127.0.0.1:8080:8080
|
networks: [backend]
|
||||||
networks:
|
|
||||||
- backend
|
|
||||||
|
|
||||||
proxy:
|
proxy:
|
||||||
image: nginx:stable
|
image: nginx:stable
|
||||||
volumes:
|
volumes:
|
||||||
@@ -53,22 +40,17 @@ services:
|
|||||||
- static_volume:/app/static:ro
|
- static_volume:/app/static:ro
|
||||||
- media_volume:/app/media:ro
|
- media_volume:/app/media:ro
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports: [80:80, 443:443]
|
||||||
- 80:80
|
|
||||||
- 443:443
|
|
||||||
environment:
|
environment:
|
||||||
- NGINX_HOSTNAME=${NGINX_HOSTNAME}
|
- NGINX_HOSTNAME=${NGINX_HOSTNAME}
|
||||||
- NGINX_PORT=80
|
- NGINX_PORT=80
|
||||||
- NGINX_SSL_PORT=443
|
- NGINX_SSL_PORT=443
|
||||||
depends_on:
|
depends_on: [web]
|
||||||
- web
|
networks: [frontend]
|
||||||
networks:
|
|
||||||
- frontend
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
frontend:
|
frontend:
|
||||||
backend:
|
backend:
|
||||||
|
internal: true
|
||||||
volumes:
|
volumes:
|
||||||
postgres_data:
|
postgres_data:
|
||||||
static_volume:
|
static_volume:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!doctype html>
|
<!DOCTYPE html>
|
||||||
<html lang="en-US">
|
<html lang="en-US">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
|||||||
Reference in New Issue
Block a user