ourschool.yaml
· 2.1 KiB · YAML
Неформатований
services:
db:
image: postgres:15-alpine
container_name: OurSchool-DB
hostname: ourschool-db
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "ourschool", "-U", "ourschooluser"]
timeout: 45s
interval: 10s
retries: 10
security_opt:
- no-new-privileges:true
environment:
TZ: Europe/Bucharest
POSTGRES_DB: ourschool
POSTGRES_USER: ourschooluser
POSTGRES_PASSWORD: ourschoolpass
volumes:
- /volume1/docker/ourschooldb:/var/lib/postgresql/data:rw
restart: on-failure:5
backend:
image: ghcr.io/dgazr/ourschool-backend:1.0.0-beta.2
container_name: OurSchool-Backend
security_opt:
- no-new-privileges:true
user: 0:0
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 15s
timeout: 10s
retries: 5
start_period: 30s
environment:
TZ: Europe/Bucharest
DATABASE_URL: postgresql+psycopg://ourschooluser:ourschoolpass@ourschool-db:5432/ourschool
DATABASE_HOST: ourschool-db
DATABASE_PORT: 5432
DATABASE_NAME: ourschool
DATABASE_USER: ourschooluser
DATABASE_PASSWORD: ourschoolpass
SECRET_KEY: 09c29b750ab22aed045ebea4a94442f304318688e075b5d468932d776fc6d72b
ALGORITHM: HS256
ACCESS_TOKEN_EXPIRE_MINUTES: 30
BACKEND_HOST: 0.0.0.0
BACKEND_PORT: 8000
LOG_LEVEL: INFO
LOG_FORMAT: json
ALLOWED_ORIGINS: http://192.168.1.18:4173
VITE_API_BASE_URL: http://192.168.1.18:4173
depends_on:
db:
condition: service_healthy
ports:
- 8006:8000
restart: on-failure:5
frontend:
image: ghcr.io/dgazr/ourschool-frontend:1.0.0-beta.2
container_name: OurSchool-FRONTEND
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:80"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
security_opt:
- no-new-privileges:true
user: 0:0
environment:
TZ: Europe/Bucharest
depends_on:
backend:
condition: service_started
ports:
- 4173:80
restart: on-failure:5
| 1 | services: |
| 2 | db: |
| 3 | image: postgres:15-alpine |
| 4 | container_name: OurSchool-DB |
| 5 | hostname: ourschool-db |
| 6 | healthcheck: |
| 7 | test: ["CMD", "pg_isready", "-q", "-d", "ourschool", "-U", "ourschooluser"] |
| 8 | timeout: 45s |
| 9 | interval: 10s |
| 10 | retries: 10 |
| 11 | security_opt: |
| 12 | - no-new-privileges:true |
| 13 | environment: |
| 14 | TZ: Europe/Bucharest |
| 15 | POSTGRES_DB: ourschool |
| 16 | POSTGRES_USER: ourschooluser |
| 17 | POSTGRES_PASSWORD: ourschoolpass |
| 18 | volumes: |
| 19 | - /volume1/docker/ourschooldb:/var/lib/postgresql/data:rw |
| 20 | restart: on-failure:5 |
| 21 | |
| 22 | backend: |
| 23 | image: ghcr.io/dgazr/ourschool-backend:1.0.0-beta.2 |
| 24 | container_name: OurSchool-Backend |
| 25 | security_opt: |
| 26 | - no-new-privileges:true |
| 27 | user: 0:0 |
| 28 | healthcheck: |
| 29 | test: ["CMD", "curl", "-f", "http://localhost:8000/health"] |
| 30 | interval: 15s |
| 31 | timeout: 10s |
| 32 | retries: 5 |
| 33 | start_period: 30s |
| 34 | environment: |
| 35 | TZ: Europe/Bucharest |
| 36 | DATABASE_URL: postgresql+psycopg://ourschooluser:ourschoolpass@ourschool-db:5432/ourschool |
| 37 | DATABASE_HOST: ourschool-db |
| 38 | DATABASE_PORT: 5432 |
| 39 | DATABASE_NAME: ourschool |
| 40 | DATABASE_USER: ourschooluser |
| 41 | DATABASE_PASSWORD: ourschoolpass |
| 42 | SECRET_KEY: 09c29b750ab22aed045ebea4a94442f304318688e075b5d468932d776fc6d72b |
| 43 | ALGORITHM: HS256 |
| 44 | ACCESS_TOKEN_EXPIRE_MINUTES: 30 |
| 45 | BACKEND_HOST: 0.0.0.0 |
| 46 | BACKEND_PORT: 8000 |
| 47 | LOG_LEVEL: INFO |
| 48 | LOG_FORMAT: json |
| 49 | ALLOWED_ORIGINS: http://192.168.1.18:4173 |
| 50 | VITE_API_BASE_URL: http://192.168.1.18:4173 |
| 51 | depends_on: |
| 52 | db: |
| 53 | condition: service_healthy |
| 54 | ports: |
| 55 | - 8006:8000 |
| 56 | restart: on-failure:5 |
| 57 | |
| 58 | frontend: |
| 59 | image: ghcr.io/dgazr/ourschool-frontend:1.0.0-beta.2 |
| 60 | container_name: OurSchool-FRONTEND |
| 61 | healthcheck: |
| 62 | test: ["CMD", "wget", "-qO-", "http://localhost:80"] |
| 63 | interval: 30s |
| 64 | timeout: 10s |
| 65 | retries: 3 |
| 66 | start_period: 10s |
| 67 | security_opt: |
| 68 | - no-new-privileges:true |
| 69 | user: 0:0 |
| 70 | environment: |
| 71 | TZ: Europe/Bucharest |
| 72 | depends_on: |
| 73 | backend: |
| 74 | condition: service_started |
| 75 | ports: |
| 76 | - 4173:80 |
| 77 | restart: on-failure:5 |