chore(deploy): switch compose to nested app directories

This commit is contained in:
2026-04-29 15:57:54 +03:30
parent 8b6f25e068
commit 8ab01bd5b7
3 changed files with 21 additions and 31 deletions

3
.gitignore vendored
View File

@@ -1,3 +1,6 @@
.env .env
backend/logs/ backend/logs/
backend/.pytest_cache/ backend/.pytest_cache/
backend/qlockify-backend-deployment
frontend/qlockify-frontend-deployment

View File

@@ -3,13 +3,11 @@ services:
image: postgres:18-alpine image: postgres:18-alpine
restart: always restart: always
env_file: env_file:
- .env - ./backend/qlockify-backend-deployment/.env
volumes: volumes:
- postgres_data:/var/lib/postgresql/data - postgres_data:/var/lib/postgresql
- ./postgres/init.sql:/docker-entrypoint-initdb.d/init.sql - ./postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
- ./postgres/custom-postgresql.conf:/etc/postgresql/postgresql.conf:ro command: postgres
- ./postgres/pg_hba.conf:/var/lib/postgresql/data/pg_hba.conf:ro
command: postgres -c config_file=/etc/postgresql/postgresql.conf
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"] test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 10s interval: 10s
@@ -26,11 +24,11 @@ services:
backend: backend:
build: build:
context: ./backend context: ./backend/qlockify-backend-deployment
dockerfile: Dockerfile dockerfile: ../Dockerfile
restart: always restart: always
env_file: env_file:
- ./backend/.env - ./backend/qlockify-backend-deployment/.env
volumes: volumes:
- static_data:/app/staticfiles - static_data:/app/staticfiles
- media_data:/app/mediafiles - media_data:/app/mediafiles
@@ -48,11 +46,11 @@ services:
celery: celery:
build: build:
context: ./backend context: ./backend/qlockify-backend-deployment
dockerfile: Dockerfile dockerfile: ../Dockerfile
restart: always restart: always
env_file: env_file:
- ./backend/.env - ./backend/qlockify-backend-deployment/.env
volumes: volumes:
- media_data:/app/mediafiles - media_data:/app/mediafiles
command: celery -A config worker -l INFO command: celery -A config worker -l INFO
@@ -66,11 +64,11 @@ services:
frontend: frontend:
build: build:
context: ./frontend context: ./frontend/qlockify-frontend-deployment
dockerfile: Dockerfile dockerfile: ../Dockerfile
restart: always restart: always
env_file: env_file:
- ./frontend/.env - ./frontend/qlockify-frontend-deployment/.env
expose: expose:
- "80" - "80"

View File

@@ -1,11 +0,0 @@
# TYPE DATABASE USER ADDRESS METHOD
local all all scram-sha-256
host all all 127.0.0.1/32 scram-sha-256
# Allow Docker containers to connect (Standard Docker bridge subnets)
host all all 172.16.0.0/12 scram-sha-256
host all all 192.168.0.0/16 scram-sha-256
# Reject everything else
host all all 0.0.0.0/0 reject
host all all ::/0 reject