-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun-docker.sh
More file actions
executable file
·33 lines (28 loc) · 926 Bytes
/
Copy pathrun-docker.sh
File metadata and controls
executable file
·33 lines (28 loc) · 926 Bytes
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
#!/bin/bash
# Script to run temp-notes with Docker (CasaOS compatible)
# Build the image
echo "Building Docker image..."
docker build -t temp-notes .
# Stop and remove existing container if it exists
echo "Stopping existing container..."
docker stop temp-notes-app 2>/dev/null || true
docker rm temp-notes-app 2>/dev/null || true
# Run the new container
echo "Starting new container..."
docker run -d \
--name temp-notes-app \
-p 3001:3001 \
-p 80:80 \
-v $(pwd)/notes.db:/app/notes.db \
-e NODE_ENV=production \
-e PORT=80 \
--restart unless-stopped \
--health-cmd="wget --no-verbose --tries=1 --spider http://localhost:80 || exit 1" \
--health-interval=30s \
--health-timeout=10s \
--health-retries=3 \
--health-start-period=40s \
temp-notes
echo "Container started! Check status with: docker ps"
echo "View logs with: docker logs -f temp-notes-app"
echo "Access the app at: http://localhost"