-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
116 lines (106 loc) · 3.58 KB
/
docker-compose.yml
File metadata and controls
116 lines (106 loc) · 3.58 KB
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
106
107
108
109
110
111
112
113
114
115
version: '3.8'
services:
postgres:
image: postgres:15
container_name: boxcopilot-postgres
env_file: .env
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- ./pgdata:/var/lib/postgresql/data
networks:
- boxcopilot-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:latest
container_name: boxcopilot-redis
networks:
- boxcopilot-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
backend:
build: backend
container_name: boxcopilot-backend
working_dir: /app
env_file: .env
volumes:
- ./logs:/app/logs
- ./images:/var/boxcopilot/images
environment:
SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE}
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
SPRING_DATA_REDIS_HOST: redis
SPRING_DATA_REDIS_PORT: 6379
CLIENT_ID: ${CLIENT_ID}
CLIENT_SECRET: ${CLIENT_SECRET}
NEXTCLOUD_URL: ${NEXTCLOUD_URL}
NEXTCLOUD_LOGOUT_URL: ${NEXTCLOUD_LOGOUT_URL}
FRONTEND_URL: ${FRONTEND_URL}
VITE_API_BASE_URL: ${VITE_API_BASE_URL}
APP_IMAGE_STORAGE_PATH: /var/boxcopilot/images
networks:
- boxcopilot-network
- traefik-proxy
labels:
- "traefik.enable=true"
- "traefik.http.routers.box-backend.entrypoints=http"
- "traefik.http.routers.box-backend.rule=Host(`${TRAEFIK_BACKEND_HOST}`)"
- "traefik.http.middlewares.box-backend-https-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.box-backend.middlewares=box-backend-https-redirect"
- "traefik.http.routers.box-backend-secure.entrypoints=https"
- "traefik.http.routers.box-backend-secure.rule=Host(`${TRAEFIK_BACKEND_HOST}`)"
- "traefik.http.routers.box-backend-secure.tls=true"
- "traefik.http.routers.box-backend-secure.tls.certresolver=http"
- "traefik.http.routers.box-backend-secure.service=box-backend"
- "traefik.http.services.box-backend.loadbalancer.server.port=8080"
- "traefik.docker.network=traefik-proxy"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
frontend:
build:
context: frontend
args:
VITE_API_BASE_URL: ${VITE_API_BASE_URL}
env_file: .env
container_name: boxcopilot-frontend
networks:
- boxcopilot-network
- traefik-proxy
labels:
- "traefik.enable=true"
- "traefik.http.routers.box.entrypoints=http"
- "traefik.http.routers.box.rule=Host(`${TRAEFIK_FRONTEND_HOST}`)"
- "traefik.http.middlewares.box-https-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.box.middlewares=box-https-redirect"
- "traefik.http.routers.box-secure.entrypoints=https"
- "traefik.http.routers.box-secure.rule=Host(`${TRAEFIK_FRONTEND_HOST}`)"
- "traefik.http.routers.box-secure.tls=true"
- "traefik.http.routers.box-secure.tls.certresolver=http"
- "traefik.http.routers.box-secure.service=box"
- "traefik.http.services.box.loadbalancer.server.port=80"
- "traefik.docker.network=traefik-proxy"
depends_on:
- backend
volumes:
pgdata:
backend-logs:
boxcopilot-images:
networks:
boxcopilot-network:
driver: bridge
traefik-proxy:
external: true