-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
72 lines (67 loc) · 1.74 KB
/
docker-compose.yml
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
version: '3'
services:
database:
container_name: database
image: postgres:14
expose:
- 5432
ports:
- "5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- FASTAPI_DB_USER=bellias
- FASTAPI_DB_PASS=pass123
- FASTAPI_DB_NAME=reference_letters_data
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "postgres", "-U", "postgres" ]
timeout: 30s
interval: 30s
retries: 3
volumes:
- 'dj_postgres_data:/var/lib/postgresql/data/'
- './assets/init_db:/docker-entrypoint-initdb.d/'
restart:
always
backend:
container_name: backend
build:
context: reference-letters-fastapi-server
dockerfile: nonroot.Dockerfile
image: ghcr.io/panagiotis-bellias-it21871/ref-letters-fastapi-server
command: uvicorn app.main:app --reload --workers 1 --host 0.0.0.0 --port 8000
ports:
- "8000:8000"
volumes:
- ./reference-letters-fastapi-server/ref_letters:/usr/data/app
env_file:
- reference-letters-fastapi-server/ref_letters/.env
healthcheck:
test:
- CMD
- wget -S --spider http://localhost:8000/docs
interval: 30s
timeout: 30s
retries: 3
depends_on:
- database
restart:
always
frontend:
container_name: frontend
build:
context: reference-letters-vuejs-client
dockerfile: Dockerfile
image: ghcr.io/panagiotis-bellias-it21871/ref-letters-vuejs-client
volumes:
- './reference-letters-vuejs-client:/app'
- '/app/node_modules'
env_file:
- reference-letters-vuejs-client/.env
ports:
- "80:80"
# - "443:443"
depends_on:
- backend
volumes:
dj_postgres_data: