-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
50 lines (45 loc) · 1.06 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
version: '3.8'
services:
relayer:
# platform: linux/amd64
# platform: linux/x86_64
build: ./relayer
command: python main.py
volumes:
- ./relayer:/usr/src/app
depends_on:
- db
environment:
SECRETS_FILE: /run/secrets/env_relayer
# DATABASE_URL=sqlite+aiosqlite:///database.db
DATABASE_URL: postgresql+asyncpg://postgres:postgres@db:5432/foo
secrets:
- env_relayer
web:
build: ./web
command: uvicorn api.main:app --reload --workers 1 --host 0.0.0.0 --port 8000
volumes:
- ./web:/usr/src/app
ports:
- 8004:8000
environment:
SECRETS_FILE: /run/secrets/env_web
# DATABASE_URL=sqlite+aiosqlite:///database.db
DATABASE_URL: postgresql+asyncpg://postgres:postgres@db:5432/foo
depends_on:
- db
secrets:
- env_web
db:
image: postgres:15.3
expose:
- 5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=foo
secrets:
env_relayer:
file: .env_relayer
env_web:
file: .env_web