1
0
mirror of https://github.com/Kovah/LinkAce.git synced 2025-01-17 21:28:30 +01:00

Make Podman installation work

- Specify registries in Dockerfiles such that Podman can resolve the dependencies
- Add a name for the PHP container, such that the commands work when using `exec -it linkace-php`
- Mention in CONTRIBUTING.md that Podman works also
- Update the PHP version in CONTRIBUTING.md as proposed in https://github.com/Kovah/LinkAce/discussions/746#discussioncomment-9101259
This commit is contained in:
chrissawyerfan4 2024-04-13 04:03:13 +02:00
parent ccd3f4411a
commit d05686daaf
8 changed files with 18 additions and 16 deletions

View File

@ -24,12 +24,13 @@ starting to code.
### Minimum Requirements ### Minimum Requirements
* [Docker](https://www.docker.com/products/docker-desktop) _or_ PHP 7.4 * [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/) (16 LTS)
### 1. Basic Setup ### 1. Basic Setup
The following steps assume that you are using Docker for development, which I highly encourage. If you use other ways to work with PHP projects you must adapt the commands to your system. 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 ```bash
cp .env.docker .env cp .env.docker .env

View File

@ -4,7 +4,7 @@ services:
# --- MariaDB # --- MariaDB
db: db:
image: mariadb:11.2 image: docker.io/library/mariadb:11.2
restart: unless-stopped restart: unless-stopped
command: mariadbd --character-set-server=utf8mb4 --collation-server=utf8mb4_bin command: mariadbd --character-set-server=utf8mb4 --collation-server=utf8mb4_bin
environment: environment:
@ -17,7 +17,7 @@ services:
# --- LinkAce Image with PHP and nginx # --- LinkAce Image with PHP and nginx
app: app:
image: linkace/linkace:simple image: docker.io/library/linkace/linkace:simple
restart: unless-stopped restart: unless-stopped
depends_on: depends_on:
- db - db

View File

@ -4,7 +4,7 @@ services:
# --- MariaDB # --- MariaDB
db: db:
image: mariadb:11.2 image: docker.io/library/mariadb:11.2
restart: unless-stopped restart: unless-stopped
command: mariadbd --character-set-server=utf8mb4 --collation-server=utf8mb4_bin command: mariadbd --character-set-server=utf8mb4 --collation-server=utf8mb4_bin
environment: environment:
@ -17,7 +17,7 @@ services:
# --- LinkAce Image with PHP # --- LinkAce Image with PHP
app: app:
image: linkace/linkace:latest image: docker.io/library/linkace/linkace:latest
restart: unless-stopped restart: unless-stopped
depends_on: depends_on:
- db - db
@ -29,7 +29,7 @@ services:
# --- nginx # --- nginx
nginx: nginx:
image: bitnami/nginx:1.24 image: docker.io/bitnami/nginx:1.24
restart: unless-stopped restart: unless-stopped
ports: ports:
- "0.0.0.0:80:8080" - "0.0.0.0:80:8080"
@ -45,7 +45,7 @@ services:
# --- Redis # --- Redis
redis: redis:
image: bitnami/redis:7.2 image: docker.io/bitnami/redis:7.2
restart: unless-stopped restart: unless-stopped
environment: environment:
- REDIS_PASSWORD=${REDIS_PASSWORD} - REDIS_PASSWORD=${REDIS_PASSWORD}

View File

@ -5,7 +5,7 @@ services:
# --- MariaDB # --- MariaDB
db: db:
image: mariadb:11.2 image: docker.io/library/mariadb:11.2
command: mariadbd --character-set-server=utf8mb4 --collation-server=utf8mb4_bin command: mariadbd --character-set-server=utf8mb4 --collation-server=utf8mb4_bin
environment: environment:
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD} - MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
@ -18,7 +18,7 @@ services:
- linkace-db:/var/lib/mysql - linkace-db:/var/lib/mysql
pg-db: pg-db:
image: postgres:14 image: docker.io/library/postgres:14
environment: environment:
- POSTGRES_PASSWORD=${DB_PASSWORD} - POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_USER=${DB_USERNAME} - POSTGRES_USER=${DB_USERNAME}
@ -30,6 +30,7 @@ services:
# --- PHP # --- PHP
php: php:
container_name: linkace-php
build: build:
context: . context: .
dockerfile: ./resources/docker/dockerfiles/development.Dockerfile dockerfile: ./resources/docker/dockerfiles/development.Dockerfile
@ -41,7 +42,7 @@ services:
# --- nginx # --- nginx
nginx: nginx:
image: bitnami/nginx:1.25 image: docker.io/bitnami/nginx:1.25
ports: ports:
- "80:8080" - "80:8080"
depends_on: depends_on:
@ -52,7 +53,7 @@ services:
# --- Redis # --- Redis
redis: redis:
image: bitnami/redis:7.2 image: docker.io/bitnami/redis:7.2
environment: environment:
- REDIS_PASSWORD=${REDIS_PASSWORD} - REDIS_PASSWORD=${REDIS_PASSWORD}
ports: ports:

View File

@ -1,7 +1,7 @@
# DOCKERFILE DEVELOPMENT # DOCKERFILE DEVELOPMENT
# Installs MySQL Client for database exports, xDebug with PCov and Composer # Installs MySQL Client for database exports, xDebug with PCov and Composer
FROM php:8.1.10-fpm FROM docker.io/library/php:8.1.10-fpm
WORKDIR /app WORKDIR /app
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \

View File

@ -1,4 +1,4 @@
FROM php:8.3-fpm-alpine FROM docker.io/library/php:8.3-fpm-alpine
# Install package and PHP dependencies # 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 postgresql-dev sqlite zip libzip-dev; \

View File

@ -1,5 +1,5 @@
# DOCKERFILE RELEASE # DOCKERFILE RELEASE
FROM linkace/linkace:latest FROM docker.io/library/linkace/linkace:latest
# Install nginx and supervisor # Install nginx and supervisor
RUN apk add --no-cache nginx supervisor RUN apk add --no-cache nginx supervisor

View File

@ -2,7 +2,7 @@
# ================================ # ================================
# PHP Dependency Setup # PHP Dependency Setup
FROM linkace/base-image:php-8.3-alpine AS builder FROM docker.io/library/linkace/base-image:php-8.3-alpine AS builder
WORKDIR /app WORKDIR /app
# Pull composer and install required packages # Pull composer and install required packages