Compare commits
4 Commits
b6c769eecc
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| 5ca66f3ed7 | |||
| c36d146fef | |||
| 3ac68a88d0 | |||
| 94b02198dd |
+1
-1
@@ -1,5 +1,5 @@
|
||||
# SQLite database file (mounted on a persistent volume in Docker)
|
||||
DATABASE_URL="file:/app/data/askedout.db"
|
||||
DATABASE_URL="file:/app/data/lovelope.db"
|
||||
|
||||
# Public base URL (used in QR codes and share links)
|
||||
APP_URL="http://localhost:3000"
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
name: Publish Docker image
|
||||
|
||||
# Two channels, not one-image-per-commit:
|
||||
# - push to `dev` -> rolling `:dev` tag, for testing in-progress work
|
||||
# - push tag `v*` -> `:latest` + the version tag, for actual releases
|
||||
# Plain commits/merges to master/main build nothing on their own.
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
branches: [dev]
|
||||
tags: ['v*']
|
||||
|
||||
permissions:
|
||||
@@ -20,6 +24,24 @@ jobs:
|
||||
- name: Compute lowercase image name
|
||||
run: echo "IMAGE_NAME=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Compute image tags
|
||||
run: |
|
||||
if [ "${{ github.ref_type }}" = "tag" ]; then
|
||||
VERSION="${{ github.ref_name }}"
|
||||
TAGS="${{ vars.REGISTRY_HOST }}/${IMAGE_NAME}:latest
|
||||
${{ vars.REGISTRY_HOST }}/${IMAGE_NAME}:${VERSION}
|
||||
ghcr.io/${IMAGE_NAME}:latest
|
||||
ghcr.io/${IMAGE_NAME}:${VERSION}"
|
||||
else
|
||||
TAGS="${{ vars.REGISTRY_HOST }}/${IMAGE_NAME}:dev
|
||||
ghcr.io/${IMAGE_NAME}:dev"
|
||||
fi
|
||||
{
|
||||
echo "TAGS<<TAGS_EOF"
|
||||
echo "$TAGS"
|
||||
echo "TAGS_EOF"
|
||||
} >> "$GITHUB_ENV"
|
||||
|
||||
- name: Log in to Gitea container registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
@@ -39,8 +61,4 @@ jobs:
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
${{ vars.REGISTRY_HOST }}/${{ env.IMAGE_NAME }}:latest
|
||||
${{ vars.REGISTRY_HOST }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
|
||||
ghcr.io/${{ env.IMAGE_NAME }}:latest
|
||||
ghcr.io/${{ env.IMAGE_NAME }}:${{ github.sha }}
|
||||
tags: ${{ env.TAGS }}
|
||||
|
||||
@@ -51,6 +51,19 @@ Types: `feat`, `fix`, `refactor`, `style`, `docs`, `chore`, `test`.
|
||||
Tag production releases as `v<major>.<minor>.<patch>` (semver) once this
|
||||
project has a deployment cadence worth marking. Not required for every merge.
|
||||
|
||||
## Docker images
|
||||
|
||||
CI (`.gitea/workflows/docker-publish.yml`) only builds an image on two
|
||||
events, not on every commit:
|
||||
|
||||
- push to `dev` — builds a rolling `:dev` tag, for testing in-progress work
|
||||
before it's ready to release.
|
||||
- push a `v*` tag — builds `:latest` plus the version tag, for actual
|
||||
releases.
|
||||
|
||||
Push to `dev` when you want a throwaway build to test; tag a release on
|
||||
`main`/`master` when you want a real one.
|
||||
|
||||
## What not to commit
|
||||
|
||||
- Anything in `.gitignore` (`.env`, `/data`, `.next`, `node_modules`, prisma
|
||||
|
||||
@@ -10,7 +10,40 @@ No accounts, no friction, just a sweet little link. Everything personal is encry
|
||||
|
||||
## Quick start
|
||||
|
||||
You need [Docker](https://www.docker.com/) installed. That's it.
|
||||
You need [Docker](https://www.docker.com/) installed. That's it — no clone required, the image is published on GHCR.
|
||||
|
||||
Create a `docker-compose.yml`:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
app:
|
||||
image: ghcr.io/jeangaston/lovelope:latest
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
DATABASE_URL: "file:/app/data/lovelope.db"
|
||||
APP_URL: "http://localhost:3000"
|
||||
GIPHY_API_KEY: "${GIPHY_API_KEY:-}"
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
Then:
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Open **http://localhost:3000**. Your data lives in `./data/lovelope.db` on your machine.
|
||||
|
||||
Want GIF search to work? Grab a free key at [developers.giphy.com](https://developers.giphy.com/), export it as `GIPHY_API_KEY` before running `docker compose up` (or drop it in a `.env` file next to `docker-compose.yml`), then restart. Without it, the app still runs fine, GIF search is just disabled.
|
||||
|
||||
Pin a specific version instead of always tracking `latest` by using a release tag, e.g. `ghcr.io/jeangaston/lovelope:v1.0.0`.
|
||||
|
||||
### Build from source
|
||||
|
||||
If you'd rather build the image yourself instead of pulling from GHCR:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/jeangaston/lovelope.git && cd lovelope
|
||||
@@ -18,9 +51,7 @@ cp .env.example .env
|
||||
docker compose up --build
|
||||
```
|
||||
|
||||
Open **http://localhost:3000**. Everything (the app and its database) runs in one container; your data lives in `./data/askedout.db` on your machine.
|
||||
|
||||
Want GIF search to work? Grab a free key at [developers.giphy.com](https://developers.giphy.com/) and put it in `.env` as `GIPHY_API_KEY`, then restart. Without it, the app still runs fine, GIF search is just disabled.
|
||||
This uses the [docker-compose.yml](docker-compose.yml) in the repo, which builds from the local [Dockerfile](Dockerfile) instead of pulling a published image.
|
||||
|
||||
## Features
|
||||
|
||||
@@ -52,7 +83,7 @@ Browsers never send the part after `#` to any server, so that key never reaches
|
||||
|
||||
| Variable | Required | Description |
|
||||
|---|---|---|
|
||||
| `DATABASE_URL` | ✅ | SQLite file path, default `file:/app/data/askedout.db` works out of the box with Docker |
|
||||
| `DATABASE_URL` | ✅ | SQLite file path, default `file:/app/data/lovelope.db` works out of the box with Docker |
|
||||
| `APP_URL` | ✅ | Base URL used to build share links, e.g. `http://localhost:3000` |
|
||||
| `GIPHY_API_KEY` | optional | Enables GIF search. Free key at [developers.giphy.com](https://developers.giphy.com/), leave blank to disable |
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ services:
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
DATABASE_URL: "file:/app/data/askedout.db"
|
||||
DATABASE_URL: "file:/app/data/lovelope.db"
|
||||
APP_URL: "http://localhost:3000"
|
||||
NODE_ENV: "development"
|
||||
GIPHY_API_KEY: "${GIPHY_API_KEY:-}"
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lovelope",
|
||||
"version": "0.1.0",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user