generated from trywilco/Anythink-Market-Base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
51 lines (51 loc) · 1.43 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
version: "3.8"
services:
anythink-backend-python:
build: ./backend
container_name: anythink-backend-python
command: >
sh -c "cd backend &&
poetry install &&
poetry export -f "requirements.txt" --without-hashes --with-credentials > "requirements.txt"
/wait-for-it.sh postgres-python:5432 -q -t 60 &&
poetry run alembic upgrade head &&
poetry run uvicorn --host=0.0.0.0 --port=3000 --reload app.main:app"
working_dir: /usr/src
volumes:
- ./:/usr/src
ports:
- "3000:3000"
environment:
- APP_ENV=dev
- SECRET_KEY=secret
- DEBUG=True
- DATABASE_URL=postgresql://postgres:@postgres-python:5432/anythink-market
depends_on:
- "postgres-python"
anythink-frontend-react:
build: ./frontend
container_name: anythink-frontend-react
command: sh -c "cd frontend && yarn install && yarn start"
environment:
- NODE_ENV=development
- PORT=3001
working_dir: /usr/src
volumes:
- ./:/usr/src/
- /usr/src/frontend/node_modules
ports:
- "3001:3001"
postgres-python:
container_name: postgres-python
restart: on-failure
image: postgres
logging:
driver: none
environment:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_PASSWORD: postgres
POSTGRES_DB: anythink-market
volumes:
- ~/postgres/data:/data/db
ports:
- '5433:5432'