-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose-prod-unused.yml
74 lines (68 loc) · 1.88 KB
/
docker-compose-prod-unused.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
version: "3.3"
networks:
web:
external: true
internal:
name: internal
external: false
services:
traefik:
image: "traefik:v3.0"
# image: "traefik:v2.9"
container_name: "traefik"
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--providers.docker.network=web"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.web.address=:80"
- "--certificatesresolvers.myresolver.tailscale=true"
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /var/run/tailscale/tailscaled.sock:/var/run/tailscale/tailscaled.sock
networks:
- web
- internal
web:
build: ./src
container_name: "web"
command: |
bash -c 'while !</dev/tcp/db/5432; do sleep 1; done; uvicorn app.main:app --reload --workers 4 --host 0.0.0.0 --port 8000'
labels:
- traefik.enable=true
- traefik.http.routers.web.rule=Host(`blakestation-wsl2-ubuntu20-04-6.cow-quail.ts.net`)
- traefik.http.routers.web.tls.certresolver=myresolver
- traefik.http.services.web.loadbalancer.server.port=8000
- traefik.http.routers.web.entrypoints=websecure
volumes:
- ./src/:/home/app/web
# ports:
# hostPort:containerPort
# - 8000:8000
environment:
- DATABASE_URL=postgresql://collectAdmin:K0113ct10n$$!@db/lawOfficeAC
networks:
- web
- internal
db:
# image: "postgres:latest"
image: postgres:13-alpine
container_name: "postgres"
volumes:
- postgres_data:/var/lib/postgresql/data/
expose:
- 5432
environment:
- POSTGRES_USER=collectAdmin
- POSTGRES_PASSWORD=K0113ct10n$$!
- POSTGRES_DB=lawOfficeAC
networks:
- internal
volumes:
postgres_data: