-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshtp_2.dev.yaml
More file actions
76 lines (71 loc) · 2.02 KB
/
Copy pathshtp_2.dev.yaml
File metadata and controls
76 lines (71 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
version: '2.1'
services:
db:
image: postgres:14 # Image with postgresql
# Expose local port to host for dev
expose:
- 5432
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
POSTGRES_USER: root # Change for yours
POSTGRES_PASSWORD: root # Change for yours
POSTGRES_DB: itc_system # Change for yours
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB" ]
interval: 1s
timeout: 5s
retries: 30
api:
build: ${BACKEND_SOURCE}
command:
- /bin/bash
- -c
- |
alembic upgrade head # Upgrade db
./run.sh
volumes:
- .:/usr/src/itc_system
- ${BACKEND_SOURCE}app/storage:/api/app/storage
ports: # Expose docker 8080 port (rest api) to host machine
- "8080:8080"
environment:
API_V1_PREFIX: "/api/v1"
DEBUG: 0 # REMOVE ON PROD
PROJECT_NAME: "ShTP Project"
VERSION: "2.0.0 Enigma"
DESCRIPTION: "Licensed version of ShTP distribution for 1561 School"
DB_ASYNC_CONNECTION_STR: "postgresql+asyncpg://root:root@db:5432/itc_system"
DB_ASYNC_TEST_CONNECTION_STR: "postgresql+asyncpg://root:root@db:5432/itc_system"
DB_EXCLUDE_TABLES: "[]"
SECRET_KEY: "12345"
JWT_ALGORITHM: "HS256"
JWT_ACCESS_TOKEN_EXPIRE_AT_MINUTES: 3000
USER_STORAGE: "/api/app/storage/users_data/uploads/"
PROFIL_ENDPOINT: "https://regs.temocenter.ru/graphql"
PROFIL_CATEGORY: 45
CHECKER_API: "http://localhost:7777/"
depends_on:
db:
condition: service_healthy
frontend:
build: ${FRONTEND_SOURCE}
command: npx pm2 --no-daemon serve build --port 3000 --spa
depends_on:
- api
ports: # Expose docker 3000 port (frontend) to host machine
- "3000:3000"
nginx:
depends_on:
- api
- frontend
restart: always
build:
dockerfile: Dockerfile
context: ./nginx
ports:
- "80:80"
volumes:
postgres_data: