-
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing resources to build and run Docker image. Resolve: #183
- Loading branch information
Showing
5 changed files
with
126 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
**/.github | ||
**/.git | ||
**/.gitignore | ||
**/.phpcs.xml | ||
**/.readthedocs.yaml | ||
**/.travis.yml | ||
**/.tx | ||
**/phpunit.xml | ||
**/release-please-config.json | ||
**/.release-please-manifest.json | ||
**/sonar-project.properties | ||
**/tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
FROM php:8.1-apache | ||
|
||
ARG ENV=production | ||
|
||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get install -y unzip libpq-dev libzip-dev curl sqlite3 && \ | ||
docker-php-ext-install pgsql pdo_pgsql pdo_mysql gettext zip | ||
|
||
COPY ./src/ /var/www/html/ | ||
|
||
# Install Composer binary | ||
COPY --from=composer /usr/bin/composer /usr/bin/composer | ||
|
||
WORKDIR /var/www/html | ||
|
||
RUN composer install --prefer-dist --no-dev | ||
|
||
RUN mv "$PHP_INI_DIR/php.ini-${ENV}" "$PHP_INI_DIR/php.ini" | ||
|
||
COPY config/apache-vhost.config /etc/apache2/sites-enabled/000-default.conf | ||
|
||
# locales | ||
RUN apt-get install -y gettext locales && \ | ||
echo 'be_BY.UTF-8 UTF-8' >> /etc/locale.gen && \ | ||
echo 'ca_ES.UTF-8 UTF-8' >> /etc/locale.gen && \ | ||
echo 'de_DE.UTF-8 UTF-8' >> /etc/locale.gen && \ | ||
echo 'es_ES.UTF-8 UTF-8' >> /etc/locale.gen && \ | ||
echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && \ | ||
echo 'fr_FR.UTF-8 UTF-8' >> /etc/locale.gen && \ | ||
echo 'it_IT.UTF-8 UTF-8' >> /etc/locale.gen && \ | ||
echo 'ja_JP.UTF-8 UTF-8' >> /etc/locale.gen && \ | ||
echo 'nl_NL.UTF-8 UTF-8' >> /etc/locale.gen && \ | ||
echo 'nn_NO.UTF-8 UTF-8' >> /etc/locale.gen && \ | ||
echo 'pl_PL.UTF-8 UTF-8' >> /etc/locale.gen && \ | ||
echo 'pt_BR.UTF-8 UTF-8' >> /etc/locale.gen && \ | ||
echo 'ro_RO.UTF-8 UTF-8' >> /etc/locale.gen && \ | ||
echo 'ru_RU.UTF-8 UTF-8' >> /etc/locale.gen && \ | ||
echo 'sv_SE.UTF-8 UTF-8' >> /etc/locale.gen && \ | ||
echo 'zh_CN.UTF-8 UTF-8' >> /etc/locale.gen && locale-gen | ||
|
||
RUN apt-get remove -y libpq-dev libzip-dev | ||
|
||
ARG user_id=1000 | ||
|
||
RUN usermod -u $user_id www-data | ||
RUN chown -v www-data /var/www/html/application/views/cache | ||
RUN a2enmod rewrite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
® Using Docker | ||
|
||
## Building the Docker image | ||
|
||
This section describe how to build Bacula-Web Docker image | ||
|
||
Set version | ||
|
||
```shell | ||
# e.g: export ver=9.4.0 | ||
export ver=x.y.z | ||
``` | ||
|
||
Clone from git repo | ||
```shell | ||
rm -rf src | ||
git clone -b v$ver https://github.com/bacula-web/bacula-web.git src | ||
``` | ||
|
||
Build using docker buildx | ||
|
||
```shell | ||
docker buildx build --load \ | ||
--no-cache \ | ||
--platform linux/amd64 \ | ||
--tag baculaweb/bacula-web:latest \ | ||
-f Dockerfile . | ||
``` | ||
|
||
Clean-up temp source folder | ||
```shell | ||
rm -rf src | ||
``` | ||
|
||
## Using the Docker image | ||
|
||
See [Bacula-Web Docker image on DockerHub](https://hub.docker.com/r/baculaweb/bacula-web) | ||
|
||
## Bug report and feature request | ||
|
||
See [bug report and feature request](https://docs.bacula-web.org/en/latest/03_get-help/support.html) in documentation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<VirtualHost *:80> | ||
|
||
ServerName bacula-web.home | ||
|
||
ServerAdmin webmaster@localhost | ||
DocumentRoot /var/www/html/public | ||
|
||
<Directory /var/www/html/public> | ||
AllowOverride All | ||
</Directory> | ||
|
||
ErrorLog ${APACHE_LOG_DIR}/error.log | ||
CustomLog ${APACHE_LOG_DIR}/access.log combined | ||
|
||
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
services: | ||
web: | ||
image: baculaweb/bacula-web:latest | ||
container_name: "bacula-web" | ||
restart: unless-stopped | ||
ports: | ||
- "8080:80" | ||
volumes: | ||
- ${PWD}/config.php:/var/www/html/application/config/config.php | ||
- ${PWD}/protected:/var/www/html/application/assets/protected |