Update environment variable paths and refine Docker setup in CI workflow
All checks were successful
CI / build (push) Successful in 45s

This commit is contained in:
2025-07-23 19:21:38 +00:00
parent 48ab2804bf
commit 05f095fba3
4 changed files with 24 additions and 9 deletions

View File

@@ -5,7 +5,7 @@
PORT=3000
# Path to the CSV file inside the container
CSV_FILE=./uploads/sha1.csv
CSV_FILE=/uploads/sha1.csv
# Base URL for images (should end with a slash or not, both are handled)

View File

@@ -48,10 +48,12 @@ jobs:
- name: Build Docker image
run: |
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/pictshare-browse:${{ steps.vars.outputs.tag }} -t ${{ secrets.DOCKERHUB_USERNAME }}/pictshare-browse:latest .
docker build -t pictshare-browse:${{ steps.vars.outputs.tag }} -t pictshare-browse:latest .
- name: Push Docker image
run: |
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
docker push ${{ secrets.DOCKERHUB_USERNAME }}/pictshare-browse:${{ steps.vars.outputs.tag }}
docker push ${{ secrets.DOCKERHUB_USERNAME }}/pictshare-browse:latest
docker tag pictshare-browse:${{ steps.vars.outputs.tag }} ryanehamil/pictshare-browse:${{ steps.vars.outputs.tag }}
docker tag pictshare-browse:latest ryanehamil/pictshare-browse:latest
docker push ryanehamil/pictshare-browse:${{ steps.vars.outputs.tag }}
docker push ryanehamil/pictshare-browse:latest

View File

@@ -11,16 +11,23 @@ This project is designed to run as a containerized Node.js app that serves a gal
### 1. Using Docker Compose
If you want to build the image locally, clone this repository and run:
#### Using the published image from Docker Hub
You can use the prebuilt image from Docker Hub:
```bash
docker compose build
docker compose up -d
```
If you are using a published image from a registry, you can skip the build step and just run:
This will pull and run `ryanehamil/pictshare-browse:latest` as defined in the provided `compose.yml`.
#### Building the image locally (optional)
If you want to build the image yourself, clone this repository and run:
```bash
docker compose build
docker compose up -d
```
@@ -36,11 +43,13 @@ The provided compose file (compose.yml) is for your convenience—feel free to u
Make sure your pictshare uploads directory (with the `sha1.csv` file) is available in a local folder. The example `compose.yml` now mounts `./uploads` from your host to `/uploads` in the container (read-only).
Example `compose.yml`:
```yaml
services:
pictshare-images:
image: ryanehamil/pictshare-browse:latest
container_name: pictshare-images
restart: unless-stopped
ports:

View File

@@ -1,8 +1,12 @@
services:
pictshare-images:
container_name: pictshare-images
pictshare-browse:
container_name: pictshare-browse
image: ryanehamil/pictshare-browse:latest
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- ./uploads:/uploads:ro
environment:
- CSV_FILE=/uploads/sha1.csv
- IMAGE_BASE_URL=https://<URLHERE>/