-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtodo-compose.yml
80 lines (75 loc) · 2.17 KB
/
todo-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
services:
cache:
image: redis:alpine
container_name: todo-redis-cache
ports:
- "6379:6379"
networks:
- todo-network
labels:
- "com.centurylinklabs.watchtower.enable=true"
api:
image: only1adwy/todo-api:latest
volumes:
- sqlite-volume:/Todo/Database
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_URLS=http://+:8080;https://+:8443
deploy:
mode: replicated
replicas: 2
update_config:
parallelism: 1
restart_policy:
condition: on-failure
depends_on:
- cache
networks:
- todo-network
command:
- "sh -c dotnet Todo.Api.dll ef database update && dotnet Todo.Api.dll"
labels:
- "com.centurylinklabs.watchtower.enable=true"
client:
image: only1adwy/todo-client:latest
container_name: todo-client
command: ["npm", "run", "build"]
environment:
- VITE_SERVER_URL=https://api.todo.aladawy.duckdns.org/api
- VITE_SERVER_LOGIN_PATH=Auth/login
- VITE_SERVER_REGISTER_PATH=Auth/register
- VITE_SERVER_REFRESH_PATH=Auth/refresh
- VITE_SERVER_LOGOUT_PATH=Auth/logout
depends_on:
- api
networks:
- todo-network
volumes:
- dist:/Todo
labels:
- "com.centurylinklabs.watchtower.enable=true"
nginx:
image: nginx:alpine
container_name: todo-reverse-proxy
ports:
- "8070:8070"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
- /var/run/docker.sock:/tmp/docker.sock:ro
- dist:/usr/share/nginx/html
depends_on:
- cache
- api
networks:
- todo-network
labels:
- "com.centurylinklabs.watchtower.enable=true"
volumes:
sqlite-volume:
name: todo-sqlite-volume
dist:
name: dist
networks:
todo-network:
driver: bridge
name: todo-network