full rewrite
This commit is contained in:
67
README.md
67
README.md
@@ -1,2 +1,65 @@
|
||||
# pictshare-browse
|
||||
|
||||
# pictshare-browse
|
||||
|
||||
## Running in Production with Docker Compose
|
||||
|
||||
This project is designed to run as a containerized Node.js app that serves a gallery of images uploaded to PictShare. It reads a CSV file from a mounted volume and displays the images in a web gallery.
|
||||
|
||||
### 1. Build the Docker Image
|
||||
|
||||
Clone this repository to your server, then build the image:
|
||||
|
||||
```bash
|
||||
docker compose build
|
||||
```
|
||||
|
||||
### 2. Start the Service
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
This will start the service in the background. The app will be available on port 3000.
|
||||
|
||||
### 3. Mount the PictShare Uploads
|
||||
|
||||
+Make sure your pictshare uploads directory (with the `sha1.csv` file) is available in a local folder. The example `docker-compose.yml` now mounts `./pictshare-data` from your host to `/uploads` in the container (read-only).
|
||||
|
||||
Example `docker-compose.yml`:
|
||||
|
||||
```yaml
|
||||
version: '3.8'
|
||||
services:
|
||||
image-api:
|
||||
container_name: pictshare-images
|
||||
build: .
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- ./pictshare-data:/uploads:ro
|
||||
```
|
||||
|
||||
Place your `sha1.csv` and images inside the `./pictshare-data` directory in your project root. The container will read from this folder at startup.
|
||||
|
||||
### 4. Updating the App
|
||||
|
||||
If you make changes to the code, rebuild the image:
|
||||
|
||||
```bash
|
||||
docker compose build
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
For development, you can still run locally with:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm start
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
If you have questions or need help with your production setup, open an issue or ask for support.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user