Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (55 loc) 路 1.77 KB
/
Copy pathdocker-compose.yml
File metadata and controls
57 lines (55 loc) 路 1.77 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
services:
app:
# Use :latest for newest production release, or pin/rollback to a specific version
# (e.g. ghcr.io/gitnasr/instagram-saved-posts:v1.0.1). See GitHub Releases for all tags.
image: ghcr.io/gitnasr/instagram-saved-posts:latest
pull_policy: always
build:
context: .
dockerfile: Dockerfile
container_name: instagram_saved_posts_app
restart: unless-stopped
ports:
- "${PORT:-5050}:3000"
environment:
- DATABASE_URL=mongodb://mongo:27017/instagram?replicaSet=rs0&directConnection=true
- NODE_ENV=production
- PORT=3000
- HOSTNAME=0.0.0.0
# AI Vector Search is an optional beta add-on and is off by default.
# To enable: docker compose -f docker-compose.yml -f docker-compose.search.yml up -d
# Optional: Cloudinary for permanent media CDN
- CLOUDINARY_CLOUD_NAME=${CLOUDINARY_CLOUD_NAME:-}
- CLOUDINARY_API_KEY=${CLOUDINARY_API_KEY:-}
- CLOUDINARY_API_SECRET=${CLOUDINARY_API_SECRET:-}
# Optional: Logging & Monitoring
- LOG_LEVEL=${LOG_LEVEL:-info}
depends_on:
mongo:
condition: service_healthy
mongo:
image: mongo:7.0
container_name: instagram_saved_posts_mongo
restart: unless-stopped
command: ["--replSet", "rs0", "--bind_ip_all", "--port", "27017"]
volumes:
- mongo_data:/data/db
healthcheck:
test: >
mongosh --port 27017 --eval "
try {
rs.status().ok
} catch (e) {
rs.initiate({
_id: 'rs0',
members: [{ _id: 0, host: 'mongo:27017' }]
}).ok
}
" || exit 1
interval: 5s
timeout: 5s
retries: 10
start_period: 2s
volumes:
mongo_data:
name: instagram_saved_posts_mongo_data