Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
ARG BASE_IMAGE=librebooking/librebooking:develop
FROM ${BASE_IMAGE}
ENV DEBIAN_FRONTEND=noninteractive

# Configure PHP memory and Xdebug defaults for development
RUN set -eux; \
echo 'memory_limit = 2048M' > /usr/local/etc/php/conf.d/docker-php-memlimit.ini; \
{ \
echo 'xdebug.mode=debug,develop'; \
echo 'xdebug.start_with_request=yes'; \
echo 'xdebug.discover_client_host=1'; \
echo 'xdebug.log_level=0'; \
} > /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini

WORKDIR /
VOLUME /config

ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["apache2-foreground"]
35 changes: 35 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/php
{
"name": "LibreBooking Development",
"dockerComposeFile": [
"./docker-compose.devcontainer.yml"
],
"service": "librebooking",
"runServices": [
"librebooking",
"db"
],
"workspaceFolder": "/var/www/html",
"mounts": [
"type=bind,source=${localWorkspaceFolder},target=/var/www/html,consistency=cached"
],
"forwardPorts": [
80
],
"postCreateCommand": "composer install --ignore-platform-req=ext-gd",
"postStartCommand": "chown -R www-data:www-data /var/www/html/uploads /var/www/html/tpl_c",
"customizations": {
"vscode": {
"extensions": [
"xdebug.php-debug",
"bmewburn.vscode-intelephense-client",
"EditorConfig.EditorConfig"
],
"settings": {
"php.validate.executablePath": "/usr/local/bin/php"
}
}
},
"shutdownAction": "stopCompose"
}
28 changes: 28 additions & 0 deletions .devcontainer/docker-compose.devcontainer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
services:
librebooking:
build:
context: .
dockerfile: Dockerfile
container_name: librebooking-app
depends_on:
- db
ports:
- "80:80"
environment:
- LB_APP_TITLE=LibreBooking-Dev
- LB_DATABASE_HOSTSPEC=librebooking-db
- LB_DATABASE_USER=librebooking
- LB_DATABASE_PASSWORD=devpass
- LB_DATABASE_NAME=librebooking
- LB_ENV=development
- TZ=UTC
db:
image: mariadb:12.0.2
container_name: librebooking-db
environment:
- MYSQL_ROOT_PASSWORD=devpass
- MYSQL_DATABASE=librebooking
- MYSQL_USER=librebooking
- MYSQL_PASSWORD=devpass
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
Loading