-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
64 lines (59 loc) · 1.49 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
version: '3.4'
services:
hometg:
build:
context: .
dockerfile: HomeTG.API/Dockerfile
pull_policy: build
ports:
- "5234:80"
volumes:
- /config/hometg:~/.local/share/hometg/DB/hometg
environment:
"ASPNETCORE_ENVIRONMENT": "linux"
# Optional way to overwrite database connection.
# "ConnectionStrings__Sqlite": "Data Source=/usr/share/hometg/Collection.db"
# "provider": "Sqlite"
"ConnectionStrings__Postgres": "Host=database;Username=hometg;Password=supersecretpassword;Database=hometg_db"
"provider": "Postgres"
networks:
- public
- private
depends_on:
- database
restart: "unless-stopped"
hometg-react:
build:
context: .
dockerfile: HomeTG.React/Dockerfile
environment:
REACT_APP_PROXY_HOST: "http://hometg"
WDS_SOCKET_PORT: 0
pull_policy: build
ports:
- "5235:3000"
networks:
- public
depends_on:
- hometg
restart: unless-stopped
# Remove this section if you want to use Sqlite instead.
# Word of warning: Sqlite is much slower when it comes to manipulating the DB.
database:
image: 'postgres:latest'
ports:
- 5432:5432
environment:
POSTGRES_USER: hometg
POSTGRES_PASSWORD: supersecretpassword
POSTGRES_DB: hometg_db
networks:
- private
volumes:
- postgres-data:/var/lib/postgresql/data/
restart: "unless-stopped"
networks:
public:
private:
volumes:
postgres-data: