Update environment variable paths and refine Docker setup in CI workflow
All checks were successful
CI / build (push) Successful in 45s
All checks were successful
CI / build (push) Successful in 45s
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
PORT=3000
|
PORT=3000
|
||||||
|
|
||||||
# Path to the CSV file inside the container
|
# 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)
|
# Base URL for images (should end with a slash or not, both are handled)
|
||||||
|
|||||||
@@ -48,10 +48,12 @@ jobs:
|
|||||||
|
|
||||||
- name: Build Docker image
|
- name: Build Docker image
|
||||||
run: |
|
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
|
- name: Push Docker image
|
||||||
run: |
|
run: |
|
||||||
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
|
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
|
||||||
docker push ${{ secrets.DOCKERHUB_USERNAME }}/pictshare-browse:${{ steps.vars.outputs.tag }}
|
docker tag pictshare-browse:${{ steps.vars.outputs.tag }} ryanehamil/pictshare-browse:${{ steps.vars.outputs.tag }}
|
||||||
docker push ${{ secrets.DOCKERHUB_USERNAME }}/pictshare-browse:latest
|
docker tag pictshare-browse:latest ryanehamil/pictshare-browse:latest
|
||||||
|
docker push ryanehamil/pictshare-browse:${{ steps.vars.outputs.tag }}
|
||||||
|
docker push ryanehamil/pictshare-browse:latest
|
||||||
|
|||||||
15
README.md
15
README.md
@@ -11,16 +11,23 @@ This project is designed to run as a containerized Node.js app that serves a gal
|
|||||||
|
|
||||||
### 1. Using Docker Compose
|
### 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
|
```bash
|
||||||
docker compose build
|
|
||||||
docker compose up -d
|
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
|
```bash
|
||||||
|
docker compose build
|
||||||
docker compose up -d
|
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).
|
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`:
|
Example `compose.yml`:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
services:
|
services:
|
||||||
pictshare-images:
|
pictshare-images:
|
||||||
|
image: ryanehamil/pictshare-browse:latest
|
||||||
container_name: pictshare-images
|
container_name: pictshare-images
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
services:
|
services:
|
||||||
pictshare-images:
|
pictshare-browse:
|
||||||
container_name: pictshare-images
|
container_name: pictshare-browse
|
||||||
|
image: ryanehamil/pictshare-browse:latest
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./uploads:/uploads:ro
|
- ./uploads:/uploads:ro
|
||||||
|
environment:
|
||||||
|
- CSV_FILE=/uploads/sha1.csv
|
||||||
|
- IMAGE_BASE_URL=https://<URLHERE>/
|
||||||
|
|||||||
Reference in New Issue
Block a user