-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dokploy.yml
105 lines (100 loc) · 3.34 KB
/
docker-compose.dokploy.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
services:
frontend:
build:
context: .
dockerfile: Dockerfile
target: frontend
args:
VITE_PUBLIC_CDN_URL: https://cdn.altloc.com
depends_on:
- backend
networks:
- dokploy-network
labels:
- "traefik.enable=true"
- "traefik.http.routers.app.rule=Host(`altloc.com`)"
- "traefik.http.services.app.loadbalancer.server.port=80"
- "traefik.http.routers.app.entrypoints=websecure"
- "traefik.http.routers.app.tls=true"
- "traefik.http.routers.app.tls.certresolver=leresolver"
backend:
restart: "always"
build:
context: .
dockerfile: Dockerfile
target: backend
depends_on:
- postgres
networks:
- dokploy-network
- dokploy-private
environment:
- DB_CONNECTION_URI=${DB_CONNECTION_URI}
- MINIO_ENDPOINT=http://minio:9000
- MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY}
- MINIO_SECRET_KEY=${MINIO_SECRET_KEY}
- MINIO_BUCKET=${MINIO_BUCKET}
- MINIO_REGION=${MINIO_REGION}
- APP_EMAILL_ADDRESS=${APP_EMAILL_ADDRESS}
- APP_EMAILL_PASSWORD=${APP_EMAILL_PASSWORD}
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
- SESSION_SECRET=${SESSION_SECRET}
- ACCESS_TOKEN_SECRET=${ACCESS_TOKEN_SECRET}
- REFRESH_TOKEN_SECRET=${REFRESH_TOKEN_SECRET}
- CLIENT_URL=https://altloc.com/
labels:
- traefik.enable=true
- traefik.http.routers.backend.rule=Host(`altloc.com`) && PathPrefix(`/api`)
- traefik.http.routers.backend.middlewares=backend
- traefik.http.middlewares.backend.stripprefix.prefixes=/api
- traefik.http.services.backend.loadbalancer.server.port=4000
postgres:
image: postgis/postgis:14-3.4-alpine
restart: unless-stopped
volumes:
- ../files/postgres:/var/lib/postgresql/data
networks:
- dokploy-private
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_DATABASE}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U altloc -d altloc"]
interval: 10s
timeout: 5s
retries: 5
minio:
image: quay.io/minio/minio
command: server /data --console-address ":9090"
restart: "always"
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
volumes:
- ../files/minio:/data
networks:
- dokploy-network
- dokploy-private
labels:
- "traefik.enable=true"
- "traefik.http.routers.minio.service=minio"
- "traefik.http.routers.minio.rule=Host(`cdn.altloc.com`)"
- "traefik.http.services.minio.loadbalancer.server.port=9000"
- "traefik.http.routers.minio.entrypoints=websecure"
- "traefik.http.routers.minio.tls=true"
- "traefik.http.routers.minio.tls.certresolver=leresolver"
- "traefik.http.routers.minio-console.service=minio-console"
- "traefik.http.routers.minio-console.rule=Host(`minio.altloc.com`)"
- "traefik.http.services.minio-console.loadbalancer.server.port=9090"
- "traefik.http.routers.minio-console.entrypoints=websecure"
- "traefik.http.routers.minio-console.tls=true"
- "traefik.http.routers.minio-console.tls.certresolver=leresolver"
volumes:
postgres-data:
minio-data:
networks:
dokploy-network:
external: true
dokploy-private: