forked from impworks/bonsai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
80 lines (75 loc) · 2.83 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
73
74
75
76
77
78
79
80
# If you want to use https with valid certificate from LetsEncrypt then you'll need to:
#
# 1) Replace the following placeholders with actual values:
# @@YOUR_EMAIL@@: your email address (required for LetsEncrypt certificate issuing)
# @@DOMAIN@@: your domain name (you could use xip.io service to generate one from your IP if you don't have one, i.e. 127.0.0.1.xip.io)
# 2) Comment traefik rules with PathPrefix and uncomment with Host
# Note that after this change Bonsai will be available only by domain name you specified,
# and will not be available by IP.
version: "3.3"
services:
traefik:
image: traefik
restart: always
command:
# - "--log.level=DEBUG"
- "--api.insecure=true"
- "--api.dashboard=true"
- "--accesslog=true"
- "--providers.docker=true"
- "--entrypoints.web.address=:80"
- "--entryPoints.websecure.address=:443"
- "--certificatesResolvers.le.acme.storage=/etc/traefik/acme/acme.json"
- "--certificatesResolvers.le.acme.email=@@YOUR_EMAIL@@"
- "--certificatesResolvers.le.acme.httpChallenge=true"
- "--certificatesResolvers.le.acme.httpChallenge.entryPoint=web"
ports:
- 80:80
- 443:443
# - 8080:8080 ## If you want to see Traefik's dashboard on custom port
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik/acme:/etc/traefik/acme
bonsai:
image: impworks/bonsai:latest
restart: unless-stopped
volumes:
- images:/app/wwwroot/media
environment:
- ConnectionStrings__Database=Server=postgres;Port=5432;Database=bonsai;User Id=bonsai;Password=test;Persist Security Info=true
- Auth__AllowPasswordAuth=true
- Auth__Facebook__AppId=
- Auth__Facebook__AppSecret=
- Auth__Google__ClientId=
- Auth__Google__ClientSecret=
- Auth__Yandex__ClientId=
- Auth__Yandex__ClientSecret=
- Auth__Vkontakte__ClientId=
- Auth__Vkontakte__ClientSecret=
- WebServer__RequireHttps=false
- ASPNETCORE_ENVIRONMENT=Production
labels:
traefik.enable: true
# traefik.http.routers.bonsai.rule: Host(`@@DOMAIN@@`)
traefik.http.routers.bonsai.rule: PathPrefix(`/`)
traefik.http.routers.bonsai.entrypoints: web
# traefik.http.routers.bonsai_secure.rule: Host(`@@DOMAIN@@`)
traefik.http.routers.bonsai_secure.rule: PathPrefix(`/`)
traefik.http.routers.bonsai_secure.entrypoints: websecure
traefik.http.routers.bonsai_secure.tls.certresolver: le
traefik.http.services.bonsai.loadbalancer.server.port: 80
stop_signal: SIGKILL
links:
- postgres
postgres:
image: postgres
restart: unless-stopped
volumes:
- database:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: test
POSTGRES_USER: bonsai
POSTGRES_DB: bonsai
volumes:
database: {}
images: {}