Compare commits
8 Commits
aee31cc4c2
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
ca59db57e1
|
|||
|
0d2c9e5314
|
|||
|
cd04eadae8
|
|||
|
e38f73d94d
|
|||
|
78b0aa4a47
|
|||
|
1020db8c7b
|
|||
|
1476d01af3
|
|||
|
b49d837097
|
47
1.0-dev/mysqli/Dockerfile
Normal file
47
1.0-dev/mysqli/Dockerfile
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
FROM php:8.0-apache AS base
|
||||||
|
|
||||||
|
ENV FLYSPRAY /var/www/flyspray
|
||||||
|
|
||||||
|
WORKDIR $FLYSPRAY
|
||||||
|
|
||||||
|
RUN apt-get update -y && \
|
||||||
|
apt-get upgrade -y && \
|
||||||
|
apt-get install -y graphviz libfreetype6-dev libjpeg-dev zlib1g-dev && \
|
||||||
|
apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN docker-php-ext-configure gd --with-freetype --with-jpeg && \
|
||||||
|
docker-php-ext-install -j$(nproc) exif gd mysqli
|
||||||
|
|
||||||
|
ENV APACHE_DOCUMENT_ROOT $FLYSPRAY
|
||||||
|
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf && \
|
||||||
|
sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
|
||||||
|
|
||||||
|
|
||||||
|
# The base target can be used for development also
|
||||||
|
# Run `docker build --target dev --tag flyspray:base` to build the base image`
|
||||||
|
# You can use this as part of a docker-compose setup to develop the flyspray application
|
||||||
|
FROM base AS dev
|
||||||
|
|
||||||
|
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
|
||||||
|
|
||||||
|
|
||||||
|
FROM composer:2.5.1 AS build
|
||||||
|
|
||||||
|
ARG flyspray_src=https://github.com/flyspray/flyspray.git
|
||||||
|
ARG flyspray_branch=master
|
||||||
|
|
||||||
|
# Only do a shallow clone
|
||||||
|
RUN git clone --depth 1 "$flyspray_src" --branch "$flyspray_branch" . && rm -rf .git
|
||||||
|
|
||||||
|
RUN composer install --ignore-platform-reqs --no-dev --optimize-autoloader
|
||||||
|
|
||||||
|
|
||||||
|
FROM base AS final
|
||||||
|
|
||||||
|
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
||||||
|
|
||||||
|
COPY --from=build --chown=www-data:www-data /app "$FLYSPRAY"
|
||||||
|
|
||||||
|
VOLUME $FLYSPRAY
|
||||||
|
EXPOSE 80 443
|
||||||
47
1.0-dev/pgsql/Dockerfile
Normal file
47
1.0-dev/pgsql/Dockerfile
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
FROM php:8.0-apache AS base
|
||||||
|
|
||||||
|
ENV FLYSPRAY /var/www/flyspray
|
||||||
|
|
||||||
|
WORKDIR $FLYSPRAY
|
||||||
|
|
||||||
|
RUN apt-get update -y && \
|
||||||
|
apt-get upgrade -y && \
|
||||||
|
apt-get install -y graphviz libpq-dev libfreetype6-dev libjpeg-dev zlib1g-dev && \
|
||||||
|
apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN docker-php-ext-configure gd --with-freetype --with-jpeg && \
|
||||||
|
docker-php-ext-install -j$(nproc) exif gd pgsql
|
||||||
|
|
||||||
|
ENV APACHE_DOCUMENT_ROOT $FLYSPRAY
|
||||||
|
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf && \
|
||||||
|
sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
|
||||||
|
|
||||||
|
|
||||||
|
# The base target can be used for development also
|
||||||
|
# Run `docker build --target dev --tag flyspray:base` to build the base image`
|
||||||
|
# You can use this as part of a docker-compose setup to develop the flyspray application
|
||||||
|
FROM base AS dev
|
||||||
|
|
||||||
|
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
|
||||||
|
|
||||||
|
|
||||||
|
FROM composer:2.5.1 AS build
|
||||||
|
|
||||||
|
ARG flyspray_src=https://github.com/flyspray/flyspray.git
|
||||||
|
ARG flyspray_branch=master
|
||||||
|
|
||||||
|
# Only do a shallow clone
|
||||||
|
RUN git clone --depth 1 "$flyspray_src" --branch "$flyspray_branch" . && rm -rf .git
|
||||||
|
|
||||||
|
RUN composer install --ignore-platform-reqs --no-dev --optimize-autoloader
|
||||||
|
|
||||||
|
|
||||||
|
FROM base AS final
|
||||||
|
|
||||||
|
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
||||||
|
|
||||||
|
COPY --from=build --chown=www-data:www-data /app "$FLYSPRAY"
|
||||||
|
|
||||||
|
VOLUME $FLYSPRAY
|
||||||
|
EXPOSE 80 443
|
||||||
@@ -20,8 +20,8 @@ RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-av
|
|||||||
|
|
||||||
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
||||||
|
|
||||||
RUN curl -L "$FLYSPRAY_SRC" | tar zxf - --strip-components=1
|
RUN curl -L "$FLYSPRAY_SRC" | tar zxf - --strip-components=1 && \
|
||||||
RUN chown www-data:www-data -R "$FLYSPRAY"
|
chown www-data:www-data -R "$FLYSPRAY"
|
||||||
|
|
||||||
VOLUME $FLYSPRAY/attachments, $FLYSPRAY/avatars
|
VOLUME $FLYSPRAY
|
||||||
EXPOSE 80 443
|
EXPOSE 80 443
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-av
|
|||||||
|
|
||||||
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
||||||
|
|
||||||
RUN curl -L "$FLYSPRAY_SRC" | tar zxf - --strip-components=1
|
RUN curl -L "$FLYSPRAY_SRC" | tar zxf - --strip-components=1 && \
|
||||||
RUN chown www-data:www-data -R "$FLYSPRAY"
|
chown www-data:www-data -R "$FLYSPRAY"
|
||||||
|
|
||||||
VOLUME $FLYSPRAY/attachments, $FLYSPRAY/avatars
|
VOLUME $FLYSPRAY
|
||||||
EXPOSE 80 443
|
EXPOSE 80 443
|
||||||
|
|||||||
66
README.md
66
README.md
@@ -1,10 +1,9 @@
|
|||||||
# flyspray-docker
|
# flyspray-docker
|
||||||
|
|
||||||
This repository contains build files for [Flyspray] docker images. The images
|
This repository contains build files for [Flyspray] docker images. The images
|
||||||
extend the official `php:apache` image. If you would like to use another
|
extend the official `php:apache` image.
|
||||||
webserver, you must create them yourself.
|
|
||||||
|
|
||||||
Images are available for [PostgreSQL] (`*/pgsql`) and [MySQL]/[MariaDB]
|
Dockerfiles are available for [PostgreSQL] (`*/pgsql`) and [MySQL]/[MariaDB]
|
||||||
(`*/mysqli`).
|
(`*/mysqli`).
|
||||||
|
|
||||||
# Prerequesits
|
# Prerequesits
|
||||||
@@ -14,9 +13,7 @@ Install [Docker].
|
|||||||
## Building the image
|
## Building the image
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker build \
|
docker build --tag rkcsd/flyspray:1.0-rc10-mysqli ./1.0-rc10/mysqli
|
||||||
--tag flyspray:1.0-rc10-mysqli \
|
|
||||||
./1.0-rc10/mysqli
|
|
||||||
```
|
```
|
||||||
|
|
||||||
If you would like to build all images, use the `build-all.sh` script.
|
If you would like to build all images, use the `build-all.sh` script.
|
||||||
@@ -34,64 +31,9 @@ docker run --name flyspray \
|
|||||||
--volume flyspray_avatars:/var/www/flyspray/avatars:rw \
|
--volume flyspray_avatars:/var/www/flyspray/avatars:rw \
|
||||||
--volume /path/to/flyspray.conf.php:/var/www/flyspray/flyspray.conf.php:rw \
|
--volume /path/to/flyspray.conf.php:/var/www/flyspray/flyspray.conf.php:rw \
|
||||||
--volume /path/to/flyspray.ini:/usr/local/etc/php/conf.d/flyspray.ini:ro \
|
--volume /path/to/flyspray.ini:/usr/local/etc/php/conf.d/flyspray.ini:ro \
|
||||||
flyspray:1.0-rc10-mysqli
|
rkcsd/flyspray:1.0-rc10-mysqli
|
||||||
```
|
```
|
||||||
|
|
||||||
## Using docker compose
|
|
||||||
|
|
||||||
1. Run `docker compose up -d`
|
|
||||||
2. Open <http://localhost:8081> in your Browser
|
|
||||||
3. Install flyspray. Use the database credentials you defined below and `"db"`
|
|
||||||
for the database hostname.
|
|
||||||
4. Optional: Mount the config file.
|
|
||||||
1. While the container is running, copy the generated config:
|
|
||||||
```bash
|
|
||||||
docker cp flyspray:/var/www/flyspray/flyspray.conf.php /path/to/flyspray.conf.php
|
|
||||||
```
|
|
||||||
2. Add the `flyspray.conf.php` file to the `volumes` of `web`
|
|
||||||
3. Recreate the container by running `docker compose up -d`
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
|
||||||
web:
|
|
||||||
container_name: flyspray
|
|
||||||
image: flyspray:1.0-rc10-mysqli
|
|
||||||
ports:
|
|
||||||
- 8081:80
|
|
||||||
volumes:
|
|
||||||
# Keep attachments and avatars between containers
|
|
||||||
- flyspray_attachments:/var/www/flyspray/attachments:rw
|
|
||||||
- flyspray_avatars:/var/www/flyspray/avatars:rw
|
|
||||||
# Recommended: Mount a custom flyspray config file
|
|
||||||
# NOTE: Do not mount an empty file!
|
|
||||||
- ./flyspray.conf.php:/var/www/flyspray/flyspray.conf.php:rw
|
|
||||||
# Optional: Mount additional php options (max upload size, etc.)
|
|
||||||
- ./flyspray.ini:/usr/local/etc/php/conf.d/flyspray.ini:ro
|
|
||||||
db:
|
|
||||||
container_name: flyspray_db
|
|
||||||
image: mariadb:10.3.2
|
|
||||||
environment:
|
|
||||||
MYSQL_DATABASE: flyspray
|
|
||||||
MYSQL_USER: flyspray
|
|
||||||
MYSQL_PASSWORD: ${DB_PASSWORD}
|
|
||||||
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
|
|
||||||
volumes:
|
|
||||||
- flyspray_dbdata:/var/lib/mysql
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
flyspray_attachements: {}
|
|
||||||
flyspray_avatars: {}
|
|
||||||
flyspray_dbdata: {}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Adding a new version
|
|
||||||
|
|
||||||
1. Copy the last version directory
|
|
||||||
2. Change the `FLYSPRAY_SRC` url
|
|
||||||
3. Make necessary changes
|
|
||||||
|
|
||||||
[Flyspray]: <http://www.flyspray.org>
|
[Flyspray]: <http://www.flyspray.org>
|
||||||
[Docker]: <https://docs.docker.com/engine/install/>
|
[Docker]: <https://docs.docker.com/engine/install/>
|
||||||
[PostgreSQL]: <https://www.postgresql.org/>
|
[PostgreSQL]: <https://www.postgresql.org/>
|
||||||
|
|||||||
2
TODO.md
2
TODO.md
@@ -1,4 +1,4 @@
|
|||||||
- Is there a low effort way to automate the setup?
|
- Is there a low effort way to automate the setup?
|
||||||
- Do we need the `graphviz` dependency?
|
- Do we need the `graphviz` dependency?
|
||||||
- Build an image of master/1.0-rc11-dev
|
|
||||||
- Distribute the images
|
- Distribute the images
|
||||||
|
- Automate distribution (and then rename dev to nightly?)
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Usage: ./build-all.sh [image-name]
|
# Usage: ./build-all.sh [image-name]
|
||||||
|
|
||||||
name="${1:-flyspray}"
|
name="${1:-rkcsd/flyspray}"
|
||||||
|
|
||||||
|
docker build -t "$name:1.0-dev-mysqli" -t "$name:1.0-dev" -t "$name:dev" ./1.0-dev/mysqli
|
||||||
|
docker build -t "$name:1.0-dev-pgsql" ./1.0-dev/pgsql
|
||||||
docker build -t "$name:1.0-rc10-mysqli" -t "$name:1.0-rc10" -t "$name:latest" ./1.0-rc10/mysqli
|
docker build -t "$name:1.0-rc10-mysqli" -t "$name:1.0-rc10" -t "$name:latest" ./1.0-rc10/mysqli
|
||||||
docker build -t "$name:1.0-rc10-pgsql" ./1.0-rc10/pgsql
|
docker build -t "$name:1.0-rc10-pgsql" ./1.0-rc10/pgsql
|
||||||
|
|||||||
@@ -3,13 +3,8 @@ version: '3.8'
|
|||||||
services:
|
services:
|
||||||
web:
|
web:
|
||||||
container_name: flyspray
|
container_name: flyspray
|
||||||
image: flyspray:1.0-rc10
|
image: rkcsd/flyspray:1.0-rc10
|
||||||
build: 1.0-rc10/mysqli
|
build: 1.0-rc10/mysqli
|
||||||
environment:
|
|
||||||
FLYSPRAY_DATABASE_DBHOST: db
|
|
||||||
FLYSPRAY_DATABASE_DBNAME: flyspray
|
|
||||||
FLYSPRAY_DATABASE_DBUSER: flyspray
|
|
||||||
FLYSPRAY_DATABASE_DBPASS: ${DB_PASSWORD}
|
|
||||||
ports:
|
ports:
|
||||||
- 8081:80
|
- 8081:80
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
Reference in New Issue
Block a user