-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
93 lines (87 loc) · 2.14 KB
/
docker-compose.yml
File metadata and controls
93 lines (87 loc) · 2.14 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
services:
neighborville:
build:
context: .
args:
- VITE_API_URL=${VITE_API_URL}
- VITE_WS_URL=${VITE_WS_URL}
- VITE_EMAIL_FROM=${VITE_EMAIL_FROM}
- VITE_EMAIL_FROM_NAME=${VITE_EMAIL_FROM_NAME}
- VITE_SESSION_TIMEOUT=${VITE_SESSION_TIMEOUT}
container_name: neighborville
ports:
- "80:80"
- "443:443"
env_file:
- .env
environment:
- NODE_ENV=${NODE_ENV}
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- /etc/nginx/ssl:/etc/nginx/ssl:ro
restart: unless-stopped
networks:
- neighborville-net
api:
build:
context: ./server
dockerfile: Dockerfile
container_name: neighborville-api
expose:
- "3001"
env_file:
- .env
environment:
- NODE_ENV=${NODE_ENV}
- PORT=3001
- ALLOWED_ORIGINS=https://domka.me,https://api.domka.me
- MAILTRAP_HOST=${MAILTRAP_HOST}
- MAILTRAP_PORT=${MAILTRAP_PORT}
- MAILTRAP_USER=${MAILTRAP_USER}
- MAILTRAP_PASS=${MAILTRAP_PASS}
- EMAIL_FROM=${EMAIL_FROM}
- EMAIL_FROM_NAME=${EMAIL_FROM_NAME}
- MONGO_URI=mongodb://mongo:27017/neighborville
- REDIS_URI=redis://redis:6379
- JWT_SECRET=${JWT_SECRET}
- COOKIE_SECRET=${COOKIE_SECRET}
- ADMIN_SECRET_KEY=${ADMIN_SECRET_KEY}
restart: unless-stopped
depends_on:
- mongo
- redis
networks:
- neighborville-net
mongo:
image: mongo:latest
container_name: neighborville-mongo
expose:
- "27017"
volumes:
- mongo-data:/data/db
restart: unless-stopped
environment:
- MONGO_INITDB_DATABASE=neighborville
networks:
- neighborville-net
redis:
image: redis:alpine
container_name: neighborville-redis
expose:
- "6379"
volumes:
- redis-data:/data
restart: unless-stopped
networks:
- neighborville-net
watchtower:
image: containrrr/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --cleanup --interval 30
restart: unless-stopped
networks:
neighborville-net:
volumes:
mongo-data:
redis-data: