-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
45 lines (45 loc) · 1.08 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
version: "3"
services:
postgresql:
container_name: images_api_postgresql
image: postgres:latest
volumes:
- postgres_db_volume:/var/lib/postgresql
nginx_react:
build:
context: .
dockerfile: ./frontend/React.Dockerfile
container_name: images_api_nginx_react
tty: true
volumes:
- images_folder:/var/www/html/images_folder/
depends_on:
- fastapi
ports:
- "80:80"
- "443:443"
fastapi:
container_name: images_api_fastapi
image: fast_api_backend
user: fastapi_user
volumes:
- images_folder:/images_folder/
depends_on:
- postgresql
- migration
command: uvicorn main:app --host 0.0.0.0 --port 8012 --proxy-headers
migration:
container_name: images_api_upgrade_db
image: fast_api_backend
user: fastapi_user
build:
context: .
dockerfile: ./backend/Python.Dockerfile
environment:
- PYTHONPATH=.
command: wait-for-it.sh postgresql:5432 -- alembic upgrade head
depends_on:
- postgresql
volumes:
images_folder: { }
postgres_db_volume: { }