Merge pull request #7835 from wallabag/modern-docker

Modern Docker
This commit is contained in:
Yassine Guedidi 2024-11-20 09:26:39 +01:00 committed by GitHub
commit 97ea9d19b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 9 additions and 9 deletions

View file

@ -7,11 +7,11 @@
- Clone the repository - Clone the repository
- Ensure your Docker daemon is running - Ensure your Docker daemon is running
- Copy `docker/php/env.example` to `docker/php/env` and customize - Copy `docker/php/env.example` to `docker/php/env` and customize
- Launch `docker-compose run --rm php composer install` to bootstrap php dependencies - Launch `docker compose run --rm php composer install` to bootstrap php dependencies
- Launch `docker-compose run --rm php bin/console wallabag:install` to bootstrap your installation - Launch `docker compose run --rm php bin/console wallabag:install` to bootstrap your installation
- Launch `docker-compose run --rm php yarn install` to bootstrap dependencies for the frontend - Launch `docker compose run --rm php yarn install` to bootstrap dependencies for the frontend
- Launch `docker-compose run --rm php yarn build:dev` to build assets for the frontend - Launch `docker compose run --rm php yarn build:dev` to build assets for the frontend
- Launch `docker-compose up -d` to start the stack - Launch `docker compose up -d` to start the stack
You'll then have: You'll then have:
- a PHP daemon with standalone web server - a PHP daemon with standalone web server
@ -20,7 +20,7 @@ You'll then have:
You can now access your wallabag instance using that url: `http://127.0.0.1:8000` You can now access your wallabag instance using that url: `http://127.0.0.1:8000`
If you want to test using an other database than SQLite, uncomment the `postgres` or `mariadb` code from the `docker-compose.yml` file at the root of the repo. Also uncomment related line in the `php` section so the database will be linked to your PHP instance. If you want to test using an other database than SQLite, uncomment the `postgres` or `mariadb` code from the `compose.yaml` file at the root of the repo. Also uncomment related line in the `php` section so the database will be linked to your PHP instance.
### Using your own PHP server ### Using your own PHP server

2
.gitignore vendored
View file

@ -15,7 +15,7 @@
.php-cs-fixer.cache .php-cs-fixer.cache
.phpunit.result.cache .phpunit.result.cache
phpunit.xml phpunit.xml
docker-compose.override.yml compose.override.yaml
# Parameters # Parameters
/app/config/parameters.yml /app/config/parameters.yml

View file

@ -11,7 +11,7 @@ else
override ENV = prod override ENV = prod
endif endif
DOCKER_COMPOSE_RUNNING := $(shell docker-compose ps -q | grep -q . && echo 1 || echo 0) DOCKER_COMPOSE_RUNNING := $(shell docker compose ps -q | grep -q . && echo 1 || echo 0)
ifeq ($(DOCKER_COMPOSE_RUNNING), 1) ifeq ($(DOCKER_COMPOSE_RUNNING), 1)
PHP := docker compose run --rm php php PHP := docker compose run --rm php php

View file

@ -1,7 +1,7 @@
# This file is a "template" of what your parameters.yml file should look like # This file is a "template" of what your parameters.yml file should look like
parameters: parameters:
# Uncomment these settings or manually update your parameters.yml # Uncomment these settings or manually update your parameters.yml
# to use docker-compose # to use Docker Compose
# #
# database_driver: %env.database_driver% # database_driver: %env.database_driver%
# database_host: %env.database_host% # database_host: %env.database_host%