Skip to content

Commit

Permalink
Merge pull request #823 from Kovah/dev
Browse files Browse the repository at this point in the history
v1 Release
  • Loading branch information
Kovah authored Jul 17, 2024
2 parents 1354ab3 + 59247d3 commit 6bb02fd
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 48 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Login to DockerHub
- name: Login to GitHub Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
Expand All @@ -38,9 +38,10 @@ jobs:
id: prep
run: |
DOCKER_IMAGE=linkace/linkace
DOCKER_IMAGE_GITUHB=ghcr.io/kovah/linkace
DOCKER_IMAGE_GITHUB=ghcr.io/kovah/linkace
MAJOR_VERSION=1.x
VERSION=${GITHUB_REF#refs/tags/}
TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:latest,${DOCKER_IMAGE_GITUHB}:${VERSION},${DOCKER_IMAGE_GITUHB}:latest"
TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:${MAJOR_VERSION},${DOCKER_IMAGE}:latest,${DOCKER_IMAGE_GITHUB}:${VERSION},${DOCKER_IMAGE_GITHUB}:${MAJOR_VERSION},${DOCKER_IMAGE_GITHUB}:latest"
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
- name: Build and push advanced image
Expand All @@ -58,7 +59,8 @@ jobs:
DOCKER_IMAGE=linkace/linkace
DOCKER_IMAGE_GITHUB=ghcr.io/kovah/linkace
VERSION=${GITHUB_REF#refs/tags/}
TAGS="${DOCKER_IMAGE}:${VERSION}-php-nginx,${DOCKER_IMAGE}:php-nginx,${DOCKER_IMAGE}:${VERSION}-simple,${DOCKER_IMAGE}:simple,${DOCKER_IMAGE_GITHUB}:${VERSION}-php-nginx,${DOCKER_IMAGE_GITHUB}:php-nginx,${DOCKER_IMAGE_GITHUB}:${VERSION}-simple,${DOCKER_IMAGE_GITHUB}:simple"
MAJOR_VERSION=1.x
TAGS="${DOCKER_IMAGE}:${VERSION}-php-nginx,${DOCKER_IMAGE}:${MAJOR_VERSION}-php-nginx,${DOCKER_IMAGE}:php-nginx,${DOCKER_IMAGE}:${VERSION}-simple,${DOCKER_IMAGE}:${MAJOR_VERSION}-simple,${DOCKER_IMAGE}:simple,${DOCKER_IMAGE_GITHUB}:${VERSION}-php-nginx,${DOCKER_IMAGE_GITHUB}:${MAJOR_VERSION}-php-nginx,${DOCKER_IMAGE_GITHUB}:php-nginx,${DOCKER_IMAGE_GITHUB}:${VERSION}-simple,${DOCKER_IMAGE_GITHUB}:${MAJOR_VERSION}-simple,${DOCKER_IMAGE_GITHUB}:simple"
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
- name: Build and push simple image
Expand Down
37 changes: 22 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,39 @@
# :construction: Contribution

If you want to contribute to the project please open a [ticket](https://github.com/Kovah/LinkAce/issues) first and
describe what you want to do or what your idea is. Maybe there already is an existing ticket for your or a very similar
If you want to contribute to the project please open an [issue](https://github.com/Kovah/LinkAce/issues) first and
describe what you want to do or what your idea is. Maybe there already is an existing issue for your or a very similar
topic.

I may decline contributions for features that may not fit into the application, so please make sure to talk to me before
starting to code.


## Contribution Guidelines

* Always use the `dev` branch to work on the application. The dev branch will contain the latest version of the app
while the `main` branch contains the stable version (which may be outdated in terms of development).
* Consider using a separate branch if you are working on a larger feature.
* LinkAce uses two primary branches for the different major versions:
* `1.x`
* `2.x`
* Those two branches hold the latest nightly (i.e. possibly unstable) code for the respective version. The latest stable
version is accessible through the releases section and the corresponding tag.
* Use the appropriate branch as a starting point for your contribution. Then open a pull request with your changes.
* Reference the issue number in your commits please.
* When opening a pull request, link to your ticket and describe what you did to solve the problem.

* When opening a pull request, link to your issue and describe what you did to solve the problem.

---


## Development

### Minimum Requirements

* [Docker](https://www.docker.com/products/docker-desktop)/[Podman](https://podman.io/docs/installation) _or_ a [currently-supported PHP version](https://www.php.net/supported-versions.php)
* For Podman, you also need to `apt`, `dnf`, or otherwise install [`podman-compose`](https://github.com/containers/podman-compose)
* [Node](https://nodejs.org/en/) (16 LTS)
* [Node](https://nodejs.org/en/) (20 LTS)

### 1. Basic Setup

The following steps assume that you are using Docker or Podman for development, which I highly encourage. If you use other ways to work with PHP projects you must adapt the commands to your system. If you want to use Podman, simply replace the word `docker` with `podman` in each command. Clone the repository to your machine and run the following commands to start the Docker container system:
The following steps assume that you are using Docker or Podman for development, which I highly encourage. If you use
other ways to work with PHP projects you must adapt the commands to your system. If you want to use Podman, simply
replace the word `docker` with `podman` in each command. Clone the repository to your machine and run the following
commands to start the Docker container system:

```bash
cp .env.docker .env
Expand All @@ -45,7 +48,8 @@ docker compose exec -it php composer install
docker compose exec -it php php artisan key:generate
```

Last step: compile all assets. Node 16 LTS is the minimum version required and recommended to use. You may use either NPM or Yarn for installing the asset dependencies.
Last step: compile all assets. Node 16 LTS is the minimum version required and recommended to use. You may use either
NPM or Yarn for installing the asset dependencies.

```bash
npm install
Expand All @@ -55,7 +59,8 @@ npm run dev

#### 2. Working with the Artisan command line

I recommend using the Artisan command line tool in the PHP container only, to make sure that the same environment is used. To do so, use the following example command:
I recommend using the Artisan command line tool in the PHP container only, to make sure that the same environment is
used. To do so, use the following example command:

```bash
docker compose exec -it php php artisan migrate
Expand All @@ -69,7 +74,6 @@ Currently, you can do this by using the command line:
docker compose exec -it php php artisan registeruser [user name] [user email]
```


## Tests

You can run existing tests with the following command:
Expand All @@ -79,10 +83,13 @@ docker compose exec -it php composer run lint
docker compose exec -it php composer run test
```

---

## LinkAce Base Docker image

The Base image for LinkAce contains several packages and PHP extensions needed by LinkAce. It shortens the build time of the release images. This step is not needed by any developer working on LinkAce and is just a documentation for maintainers.
The Base image for LinkAce contains several packages and PHP extensions needed by LinkAce. It shortens the build time of
the release images. This step is not needed by any developer working on LinkAce and is just a documentation for
maintainers.

```bash
docker buildx build --push --platform "linux/amd64,linux/arm64,linux/arm/v7" -t linkace/base-image:php-8.3-alpine -f resources/docker/dockerfiles/release-base.Dockerfile .
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<p align="center"><b>Your self-hosted bookmark archive.</b></p>

<p align="center">
<a href="https://twitter.com/LinkAceApp"><img src="https://img.shields.io/twitter/url?label=%40LinkAceApp&style=social&url=https%3A%2F%2Ftwitter.com%2FLinkAceApp" alt="Follow LinkAce on Twitter"></a>
<a href="https://hub.docker.com/r/linkace/linkace"><img src="https://img.shields.io/badge/Docker-linkace%2Flinkace-2596EC.svg" alt="Docker Repository"></a>
<a href="https://twitter.com/LinkAceApp"><img src="https://img.shields.io/badge/X.com%2FLinkAceApp-black" alt="Follow LinkAce on X.com"></a>
<a href="https://mastodon.social/@linkace"><img src="https://img.shields.io/badge/%40linkace%40mastodon.social-6364ff" alt="Follow LinkAce on Mastodon"></a>
<a href="https://github.com/Kovah/LinkAce/releases"><img src="https://img.shields.io/github/v/release/kovah/linkace?label=Latest%20Release" alt="Latest Release"></a>
<a href="https://opensource.org/licenses/GPL-3.0"><img src="https://img.shields.io/github/license/kovah/linkace.svg" alt="License"></a>
</p>
Expand Down Expand Up @@ -38,7 +38,7 @@ It provides a long-term archive to store links to websites, media files or anyth

* Save links with automatic title and description generation.
* Automated link monitoring informs you when any links become unavailable or were moved.
* Automated backups of saved sites via the [Internet Archive](https://web.archive.org/).
* Automated archiving of saved sites via the [Internet Archive](https://web.archive.org/).
* Organize bookmarks with the help of lists and tags.
* A full REST API offers access to all features of LinkAce from other apps and services.
* LinkAce is also [available on Zapier](https://zapier.com/apps/linkace/integrations) and integrates with over 2500+ applications.
Expand Down Expand Up @@ -72,7 +72,7 @@ LinkAce provides multiple ways of installing it on your server. The complete doc

I built LinkAce to solve my own problem, and I now offer my solution and code without charging any money. I spent a lot of my free time building this application, so I won't offer any *free* personal support, customization or installation help. If you need help please visit the [community discussions](https://github.com/Kovah/LinkAce/discussions) and post your issue there.

You can get personal and dedicated support by **becoming a supporter on [Open Collective](https://opencollective.com/linkace), [Patreon](https://www.patreon.com/Kovah) or [Github](https://github.com/sponsors/Kovah)**. :star:
:star: You can get personal and dedicated support by **becoming a supporter on [Open Collective](https://opencollective.com/linkace), [Patreon](https://www.patreon.com/Kovah) or [Github](https://github.com/sponsors/Kovah)**.

#### Our Supporters on Open Collective

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
- linkace-db:/var/lib/mysql

pg-db:
image: docker.io/library/postgres:14
image: docker.io/library/postgres:16
environment:
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_USER=${DB_USERNAME}
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "linkace",
"version": "1.15.0",
"version": "1.15.1",
"description": "A small, selfhosted bookmark manager with advanced features, built with Laravel and Docker",
"homepage": "https://github.com/Kovah/LinkAce",
"repository": {
Expand All @@ -15,7 +15,7 @@
"devDependencies": {
"laravel-mix": "^6.0.31",
"postcss": "^8.4.35",
"sass": "^1.71.1",
"sass": "^1.77.8",
"sass-loader": "^14.1.0"
},
"dependencies": {
Expand Down
25 changes: 11 additions & 14 deletions resources/docker/dockerfiles/development.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
# DOCKERFILE DEVELOPMENT
# Installs MySQL Client for database exports, xDebug with PCov and Composer
# Installs database clients for database exports, xDebug with PCov and Composer

FROM docker.io/library/php:8.1.10-fpm
FROM docker.io/library/php:8.1-fpm-alpine
WORKDIR /app

RUN apt-get update && apt-get install -y \
zip \
git \
mariadb-client \
autoconf \
build-essential \
libpq-dev \
libzip-dev

RUN pecl install xdebug pcov
RUN docker-php-ext-install bcmath pdo_mysql pdo_pgsql zip
RUN docker-php-ext-enable xdebug pcov
# Install package and PHP dependencies
RUN apk add --no-cache git mariadb-client postgresql-client postgresql-dev sqlite zip libzip-dev; \
docker-php-ext-configure zip; \
docker-php-ext-install bcmath pdo_mysql pdo_pgsql zip ftp; \
docker-php-ext-enable xdebug pcov; \
mkdir /ssl-certs; \
docker-php-source delete; \
rm -f /usr/src/php.tar.xz /usr/src/php.tar.xz.asc; \
apk del --no-cache postgresql-dev

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

Expand Down
6 changes: 4 additions & 2 deletions resources/docker/dockerfiles/release-base.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FROM docker.io/library/php:8.3-fpm-alpine

# Install package and PHP dependencies
RUN apk add --no-cache mariadb-client postgresql postgresql-dev sqlite zip libzip-dev; \
RUN apk add --no-cache mariadb-client postgresql-client postgresql-dev sqlite zip libzip-dev; \
docker-php-ext-configure zip; \
docker-php-ext-install bcmath pdo_mysql pdo_pgsql zip ftp; \
mkdir /ssl-certs; \
docker-php-source delete
docker-php-source delete; \
rm -f /usr/src/php.tar.xz /usr/src/php.tar.xz.asc; \
apk del --no-cache postgresql-dev

0 comments on commit 6bb02fd

Please sign in to comment.