mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Alter docker paths
This commit is contained in:
41
dev/docker-compose.yml
Normal file
41
dev/docker-compose.yml
Normal file
@ -0,0 +1,41 @@
|
||||
# This is a Docker Compose configuration
|
||||
# intended for development purposes
|
||||
|
||||
version: '3'
|
||||
|
||||
volumes:
|
||||
db: {}
|
||||
|
||||
services:
|
||||
db:
|
||||
image: mysql:8
|
||||
environment:
|
||||
MYSQL_DATABASE: bookstack-test
|
||||
MYSQL_USER: bookstack-test
|
||||
MYSQL_PASSWORD: bookstack-test
|
||||
MYSQL_RANDOM_ROOT_PASSWORD: 'true'
|
||||
command: --default-authentication-plugin=mysql_native_password
|
||||
volumes:
|
||||
- db:/var/lib/mysql
|
||||
app:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: ./dev/docker/Dockerfile
|
||||
environment:
|
||||
DB_CONNECTION: mysql
|
||||
DB_HOST: db
|
||||
DB_PORT: 3306
|
||||
DB_DATABASE: bookstack-test
|
||||
DB_USERNAME: bookstack-test
|
||||
DB_PASSWORD: bookstack-test
|
||||
ports:
|
||||
- ${DEV_PORT:-8080}:80
|
||||
volumes:
|
||||
- ../:/app
|
||||
entrypoint: /app/dev/docker/entrypoint.app.sh
|
||||
node:
|
||||
image: node:alpine
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ../:/app
|
||||
entrypoint: /app/dev/docker/entrypoint.node.sh
|
15
dev/docker/Dockerfile
Normal file
15
dev/docker/Dockerfile
Normal file
@ -0,0 +1,15 @@
|
||||
FROM php:7.3-apache
|
||||
|
||||
ENV APACHE_DOCUMENT_ROOT /app/public
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update -y \
|
||||
&& apt-get install -y libtidy-dev libpng-dev libxml++2.6-dev wait-for-it \
|
||||
&& docker-php-ext-install pdo pdo_mysql tidy dom xml mbstring gd \
|
||||
&& a2enmod rewrite \
|
||||
&& 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 \
|
||||
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
|
||||
&& php composer-setup.php \
|
||||
&& mv composer.phar /usr/bin/composer \
|
||||
&& php -r "unlink('composer-setup.php');"
|
14
dev/docker/entrypoint.app.sh
Executable file
14
dev/docker/entrypoint.app.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
env
|
||||
|
||||
if [[ -n "$1" ]]; then
|
||||
exec "$@"
|
||||
else
|
||||
wait-for-it db:3306 -t 45
|
||||
php artisan migrate --database=mysql
|
||||
chown -R www-data:www-data storage
|
||||
exec apache2-foreground
|
||||
fi
|
8
dev/docker/entrypoint.node.sh
Executable file
8
dev/docker/entrypoint.node.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
npm install
|
||||
npm rebuild node-sass
|
||||
|
||||
exec npm run watch
|
Reference in New Issue
Block a user