mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
arrange volumes
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
.settings
|
||||
/nodes_modules
|
||||
/vendor
|
||||
/volumes
|
||||
/docker-compose.*
|
||||
/Dockerfile
|
||||
/.env
|
||||
|
3
.env
3
.env
@@ -56,9 +56,6 @@ MYSQL_MAX_ALLOWED_PACKET=16M
|
||||
# PhpMyAdmin port
|
||||
PHPMYADMIN_PORT=8089
|
||||
|
||||
# Mount local volumes
|
||||
PHRASEANET_VOLUMES_DIR=./volumes
|
||||
|
||||
# Xdebug
|
||||
XDEBUG_ENABLED=1
|
||||
XDEBUG_PROFILER_ENABLED=0
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -71,5 +71,3 @@ playbook.retry
|
||||
npm-debug.log
|
||||
|
||||
/Phrasea_datas
|
||||
|
||||
/volumes
|
||||
|
13
Dockerfile
13
Dockerfile
@@ -77,23 +77,24 @@ RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
|
||||
nodejs \
|
||||
yarn \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists
|
||||
&& rm -rf /var/lib/apt/lists \
|
||||
&& mkdir -p /var/alchemy/Phraseanet \
|
||||
&& chown -R app:app /var/alchemy
|
||||
|
||||
WORKDIR /var/alchemy/Phraseanet
|
||||
|
||||
USER app
|
||||
|
||||
# Warm up composer cache for faster builds
|
||||
COPY docker/caching/composer.* ./
|
||||
RUN composer install --prefer-dist --no-dev --no-progress --no-suggest --classmap-authoritative --no-interaction --no-scripts \
|
||||
&& rm -rf vendor composer.*
|
||||
# End warm up
|
||||
|
||||
COPY . .
|
||||
COPY --chown=app . .
|
||||
|
||||
RUN rm -rf docker \
|
||||
&& make install_composer \
|
||||
&& make clean_assets \
|
||||
&& make install_asset_dependencies \
|
||||
&& make install_assets
|
||||
&& make install
|
||||
|
||||
ADD docker/phraseanet/ /
|
||||
|
||||
|
5
Makefile
5
Makefile
@@ -5,7 +5,10 @@ install:
|
||||
make install_assets
|
||||
|
||||
install_composer:
|
||||
composer install --ignore-platform-reqs
|
||||
composer install --ignore-platform-reqs --no-dev --no-suggest --classmap-authoritative --no-interaction
|
||||
|
||||
install_composer_dev:
|
||||
composer install
|
||||
|
||||
install_asset_dependencies:
|
||||
yarn install
|
||||
|
45
README.md
45
README.md
@@ -32,26 +32,6 @@ You can also download a testing pre installed Virtual Machine in OVA format here
|
||||
|
||||
https://www.phraseanet.com/download/
|
||||
|
||||
# Development :
|
||||
|
||||
For development purpose Phraseanet is shipped with ready to use development environments using vagrant.
|
||||
You can easily choose betweeen a complete build or a prebuild box, with a specific PHP version.
|
||||
|
||||
git clone
|
||||
vagrant up --provision
|
||||
|
||||
then, a prompt allow you to choose PHP version, and another one to choose a complete build or an Alchemy prebuilt boxes.
|
||||
|
||||
Ex:
|
||||
- vagrant up --provision //// 5.6 ///// 1 >> Build an ubuntu/xenial box with php5.6
|
||||
- vagrant up --provision //// 7.0 ///// 1 >> Build an ubuntu/xenial with php7.0
|
||||
- vagrant up --provision //// 7.2 ///// 2 >> Build the alchemy/phraseanet-php-7.2 box
|
||||
- vagrant up --provision //// 5.6 ///// 1 >> Build the alchemy/phraseanet-php-5.6 box
|
||||
|
||||
|
||||
For development with Phraseanet API see https://docs.phraseanet.com/4.0/en/Devel/index.html
|
||||
|
||||
|
||||
# With Docker
|
||||
|
||||
## Prerequisites
|
||||
@@ -67,7 +47,6 @@ Use `export` to override these values.
|
||||
i.e:
|
||||
```bash
|
||||
export PHRASEANET_DOCKER_TAG=latest
|
||||
export PHRASEANET_VOLUMES_DIR=/path/to/my/custom/dir
|
||||
export INSTALL_ACCOUNT_EMAIL=foo@bar.com
|
||||
export INSTALL_ACCOUNT_PASSWORD=$3cr3t!
|
||||
export PHRASEANET_APP_PORT=8082
|
||||
@@ -100,7 +79,7 @@ The environment is not ready yet: you have to fetch all dependencies.
|
||||
|
||||
This can be made easily from the builder container:
|
||||
|
||||
docker-compose exec -u app builder make
|
||||
docker-compose run --rm -u app builder make install install_composer_dev
|
||||
|
||||
> Please note that the phraseanet image does not contain nor `composer` neither `node` tools. This allow the final image to be slim.
|
||||
> If you need to use dev tools, ensure you are running the `builder` image!
|
||||
@@ -131,3 +110,25 @@ Before moving all the files, or to use a different location, you have to remove
|
||||
docker-compose down --volumes
|
||||
|
||||
Then move the files and set the `VOLUMES_DIR` to the new location.
|
||||
|
||||
|
||||
# With Vagrant (deprecated)
|
||||
|
||||
## Development :
|
||||
|
||||
For development purpose Phraseanet is shipped with ready to use development environments using vagrant.
|
||||
You can easily choose betweeen a complete build or a prebuild box, with a specific PHP version.
|
||||
|
||||
git clone
|
||||
vagrant up --provision
|
||||
|
||||
then, a prompt allow you to choose PHP version, and another one to choose a complete build or an Alchemy prebuilt boxes.
|
||||
|
||||
Ex:
|
||||
- vagrant up --provision //// 5.6 ///// 1 >> Build an ubuntu/xenial box with php5.6
|
||||
- vagrant up --provision //// 7.0 ///// 1 >> Build an ubuntu/xenial with php7.0
|
||||
- vagrant up --provision //// 7.2 ///// 2 >> Build the alchemy/phraseanet-php-7.2 box
|
||||
- vagrant up --provision //// 5.6 ///// 1 >> Build the alchemy/phraseanet-php-5.6 box
|
||||
|
||||
|
||||
For development with Phraseanet API see https://docs.phraseanet.com/4.0/en/Devel/index.html
|
||||
|
@@ -10,13 +10,15 @@ services:
|
||||
|
||||
gateway:
|
||||
volumes:
|
||||
- .:/var/alchemy
|
||||
- .:/var/alchemy/Phraseanet
|
||||
|
||||
builder:
|
||||
build:
|
||||
context: .
|
||||
target: builder
|
||||
command: exit 0
|
||||
volumes:
|
||||
- .:/var/alchemy/Phraseanet
|
||||
|
||||
phraseanet:
|
||||
environment:
|
||||
@@ -24,11 +26,11 @@ services:
|
||||
- XDEBUG_CONFIG=remote_host=${PHRASEANET_GATEWAY_IP} idekey=${IDE_KEY} remote_enable=1 profiler_enable=${XDEBUG_PROFILER_ENABLED} profiler_output_dir=/var/alchemy/Phraseanet/cache/profiler
|
||||
- PHP_IDE_CONFIG
|
||||
volumes:
|
||||
- .:/var/alchemy
|
||||
- .:/var/alchemy/Phraseanet
|
||||
|
||||
worker:
|
||||
volumes:
|
||||
- .:/var/alchemy
|
||||
- .:/var/alchemy/Phraseanet
|
||||
|
||||
rabbitmq:
|
||||
ports:
|
||||
@@ -49,48 +51,3 @@ networks:
|
||||
ipam:
|
||||
config:
|
||||
- subnet: $PHRASEANET_SUBNET_IPS
|
||||
|
||||
volumes:
|
||||
data_vol:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
device: $PHRASEANET_VOLUMES_DIR/data
|
||||
o: bind
|
||||
db_vol:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
device: $PHRASEANET_VOLUMES_DIR/db
|
||||
o: bind
|
||||
elasticsearch_vol:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
device: $PHRASEANET_VOLUMES_DIR/elasticsearch
|
||||
o: bind
|
||||
config_vol:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
device: $PHRASEANET_VOLUMES_DIR/config
|
||||
o: bind
|
||||
custom_vol:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
device: $PHRASEANET_VOLUMES_DIR/custom
|
||||
o: bind
|
||||
thumbnails_vol:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
device: $PHRASEANET_VOLUMES_DIR/thumbnails
|
||||
o: bind
|
||||
# to be replacer by stdout/stderr
|
||||
logs_vol:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
device: $PHRASEANET_VOLUMES_DIR/logs
|
||||
o: bind
|
||||
|
@@ -9,7 +9,6 @@ services:
|
||||
restart: on-failure
|
||||
volumes:
|
||||
- data_vol:/var/alchemy/Phraseanet/datas:rw
|
||||
- custom_vol:/var/alchemy/Phraseanet/www/custom:rw
|
||||
- thumbnails_vol:/var/alchemy/Phraseanet/www/thumbnails:rw
|
||||
depends_on:
|
||||
- phraseanet
|
||||
@@ -50,11 +49,9 @@ services:
|
||||
- INSTALL_RABBITMQ_PASSWORD=$RABBITMQ_DEFAULT_PASS
|
||||
volumes:
|
||||
- data_vol:/var/alchemy/Phraseanet/datas:rw
|
||||
- config_vol:/var/alchemy/Phraseanet/config:rw
|
||||
- tmp_vol:/var/alchemy/Phraseanet/tmp:rw
|
||||
- logs_vol:/var/alchemy/Phraseanet/logs:rw
|
||||
- thumbnails_vol:/var/alchemy/Phraseanet/www/thumbnails:rw
|
||||
- custom_vol:/var/alchemy/Phraseanet/www/custom:rw
|
||||
|
||||
worker:
|
||||
build:
|
||||
@@ -75,7 +72,6 @@ services:
|
||||
- PHP_LOG_LEVEL
|
||||
volumes:
|
||||
- data_vol:/var/alchemy/Phraseanet/datas:rw
|
||||
- config_vol:/var/alchemy/Phraseanet/config:rw
|
||||
- tmp_vol:/var/alchemy/Phraseanet/tmp:rw
|
||||
- logs_vol:/var/alchemy/Phraseanet/logs:rw
|
||||
- thumbnails_vol:/var/alchemy/Phraseanet/www/thumbnails:rw
|
||||
@@ -117,10 +113,6 @@ volumes:
|
||||
driver: local
|
||||
elasticsearch_vol:
|
||||
driver: local
|
||||
config_vol:
|
||||
driver: local
|
||||
custom_vol:
|
||||
driver: local
|
||||
thumbnails_vol:
|
||||
driver: local
|
||||
# to be replacer by stdout/stderr
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
set -xe
|
||||
|
||||
|
Reference in New Issue
Block a user