-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
45 lines (42 loc) · 1.18 KB
/
docker-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
services:
mongodb:
image: mongo:latest
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
volumes:
- mongodb_data:/data/db
ports:
- "${MONGODB_PORT}:27017"
redis:
image: redis:latest
restart: unless-stopped
volumes:
- redis_data:/data
ports:
- "${REDIS_PORT}:6379"
command: redis-server --save 60 1 --loglevel warning
website:
image: myrustblog:latest
restart: unless-stopped
build:
context: .
dockerfile: Dockerfile
environment:
- DATABASE_URL=mongodb://${MONGO_INITDB_ROOT_USERNAME}:${MONGO_INITDB_ROOT_PASSWORD}@mongodb:27017
- REDIS_URL=redis://redis:6379
- RUST_LOG=${RUST_LOG}
- SMTP_SERVER=${SMTP_SERVER}
- SMTP_USERNAME=${SMTP_USERNAME}
- SMTP_PASSWORD=${SMTP_PASSWORD}
- JWT_SECRET=${JWT_SECRET}
- NEW_USER_DEFAULT_ROLE=${NEW_USER_DEFAULT_ROLE}
- WEBSITE_URL=${WEBSITE_URL}
- RSS_TITLE=${RSS_TITLE}
- RSS_DESCRIPTION=${RSS_DESCRIPTION}
ports:
- "${WEBSITE_PORT}:8081"
volumes:
mongodb_data:
redis_data: