mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
arrange volumes
This commit is contained in:
@@ -3,7 +3,6 @@
|
|||||||
.settings
|
.settings
|
||||||
/nodes_modules
|
/nodes_modules
|
||||||
/vendor
|
/vendor
|
||||||
/volumes
|
|
||||||
/docker-compose.*
|
/docker-compose.*
|
||||||
/Dockerfile
|
/Dockerfile
|
||||||
/.env
|
/.env
|
||||||
|
3
.env
3
.env
@@ -56,9 +56,6 @@ MYSQL_MAX_ALLOWED_PACKET=16M
|
|||||||
# PhpMyAdmin port
|
# PhpMyAdmin port
|
||||||
PHPMYADMIN_PORT=8089
|
PHPMYADMIN_PORT=8089
|
||||||
|
|
||||||
# Mount local volumes
|
|
||||||
PHRASEANET_VOLUMES_DIR=./volumes
|
|
||||||
|
|
||||||
# Xdebug
|
# Xdebug
|
||||||
XDEBUG_ENABLED=1
|
XDEBUG_ENABLED=1
|
||||||
XDEBUG_PROFILER_ENABLED=0
|
XDEBUG_PROFILER_ENABLED=0
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -71,5 +71,3 @@ playbook.retry
|
|||||||
npm-debug.log
|
npm-debug.log
|
||||||
|
|
||||||
/Phrasea_datas
|
/Phrasea_datas
|
||||||
|
|
||||||
/volumes
|
|
||||||
|
13
Dockerfile
13
Dockerfile
@@ -77,23 +77,24 @@ RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
|
|||||||
nodejs \
|
nodejs \
|
||||||
yarn \
|
yarn \
|
||||||
&& apt-get clean \
|
&& 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
|
WORKDIR /var/alchemy/Phraseanet
|
||||||
|
|
||||||
|
USER app
|
||||||
|
|
||||||
# Warm up composer cache for faster builds
|
# Warm up composer cache for faster builds
|
||||||
COPY docker/caching/composer.* ./
|
COPY docker/caching/composer.* ./
|
||||||
RUN composer install --prefer-dist --no-dev --no-progress --no-suggest --classmap-authoritative --no-interaction --no-scripts \
|
RUN composer install --prefer-dist --no-dev --no-progress --no-suggest --classmap-authoritative --no-interaction --no-scripts \
|
||||||
&& rm -rf vendor composer.*
|
&& rm -rf vendor composer.*
|
||||||
# End warm up
|
# End warm up
|
||||||
|
|
||||||
COPY . .
|
COPY --chown=app . .
|
||||||
|
|
||||||
RUN rm -rf docker \
|
RUN rm -rf docker \
|
||||||
&& make install_composer \
|
&& make install
|
||||||
&& make clean_assets \
|
|
||||||
&& make install_asset_dependencies \
|
|
||||||
&& make install_assets
|
|
||||||
|
|
||||||
ADD docker/phraseanet/ /
|
ADD docker/phraseanet/ /
|
||||||
|
|
||||||
|
5
Makefile
5
Makefile
@@ -5,7 +5,10 @@ install:
|
|||||||
make install_assets
|
make install_assets
|
||||||
|
|
||||||
install_composer:
|
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:
|
install_asset_dependencies:
|
||||||
yarn install
|
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/
|
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
|
# With Docker
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
@@ -67,7 +47,6 @@ Use `export` to override these values.
|
|||||||
i.e:
|
i.e:
|
||||||
```bash
|
```bash
|
||||||
export PHRASEANET_DOCKER_TAG=latest
|
export PHRASEANET_DOCKER_TAG=latest
|
||||||
export PHRASEANET_VOLUMES_DIR=/path/to/my/custom/dir
|
|
||||||
export INSTALL_ACCOUNT_EMAIL=foo@bar.com
|
export INSTALL_ACCOUNT_EMAIL=foo@bar.com
|
||||||
export INSTALL_ACCOUNT_PASSWORD=$3cr3t!
|
export INSTALL_ACCOUNT_PASSWORD=$3cr3t!
|
||||||
export PHRASEANET_APP_PORT=8082
|
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:
|
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.
|
> 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!
|
> 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
|
docker-compose down --volumes
|
||||||
|
|
||||||
Then move the files and set the `VOLUMES_DIR` to the new location.
|
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:
|
gateway:
|
||||||
volumes:
|
volumes:
|
||||||
- .:/var/alchemy
|
- .:/var/alchemy/Phraseanet
|
||||||
|
|
||||||
builder:
|
builder:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
target: builder
|
target: builder
|
||||||
command: exit 0
|
command: exit 0
|
||||||
|
volumes:
|
||||||
|
- .:/var/alchemy/Phraseanet
|
||||||
|
|
||||||
phraseanet:
|
phraseanet:
|
||||||
environment:
|
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
|
- 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
|
- PHP_IDE_CONFIG
|
||||||
volumes:
|
volumes:
|
||||||
- .:/var/alchemy
|
- .:/var/alchemy/Phraseanet
|
||||||
|
|
||||||
worker:
|
worker:
|
||||||
volumes:
|
volumes:
|
||||||
- .:/var/alchemy
|
- .:/var/alchemy/Phraseanet
|
||||||
|
|
||||||
rabbitmq:
|
rabbitmq:
|
||||||
ports:
|
ports:
|
||||||
@@ -49,48 +51,3 @@ networks:
|
|||||||
ipam:
|
ipam:
|
||||||
config:
|
config:
|
||||||
- subnet: $PHRASEANET_SUBNET_IPS
|
- 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
|
restart: on-failure
|
||||||
volumes:
|
volumes:
|
||||||
- data_vol:/var/alchemy/Phraseanet/datas:rw
|
- data_vol:/var/alchemy/Phraseanet/datas:rw
|
||||||
- custom_vol:/var/alchemy/Phraseanet/www/custom:rw
|
|
||||||
- thumbnails_vol:/var/alchemy/Phraseanet/www/thumbnails:rw
|
- thumbnails_vol:/var/alchemy/Phraseanet/www/thumbnails:rw
|
||||||
depends_on:
|
depends_on:
|
||||||
- phraseanet
|
- phraseanet
|
||||||
@@ -50,11 +49,9 @@ services:
|
|||||||
- INSTALL_RABBITMQ_PASSWORD=$RABBITMQ_DEFAULT_PASS
|
- INSTALL_RABBITMQ_PASSWORD=$RABBITMQ_DEFAULT_PASS
|
||||||
volumes:
|
volumes:
|
||||||
- data_vol:/var/alchemy/Phraseanet/datas:rw
|
- data_vol:/var/alchemy/Phraseanet/datas:rw
|
||||||
- config_vol:/var/alchemy/Phraseanet/config:rw
|
|
||||||
- tmp_vol:/var/alchemy/Phraseanet/tmp:rw
|
- tmp_vol:/var/alchemy/Phraseanet/tmp:rw
|
||||||
- logs_vol:/var/alchemy/Phraseanet/logs:rw
|
- logs_vol:/var/alchemy/Phraseanet/logs:rw
|
||||||
- thumbnails_vol:/var/alchemy/Phraseanet/www/thumbnails:rw
|
- thumbnails_vol:/var/alchemy/Phraseanet/www/thumbnails:rw
|
||||||
- custom_vol:/var/alchemy/Phraseanet/www/custom:rw
|
|
||||||
|
|
||||||
worker:
|
worker:
|
||||||
build:
|
build:
|
||||||
@@ -75,7 +72,6 @@ services:
|
|||||||
- PHP_LOG_LEVEL
|
- PHP_LOG_LEVEL
|
||||||
volumes:
|
volumes:
|
||||||
- data_vol:/var/alchemy/Phraseanet/datas:rw
|
- data_vol:/var/alchemy/Phraseanet/datas:rw
|
||||||
- config_vol:/var/alchemy/Phraseanet/config:rw
|
|
||||||
- tmp_vol:/var/alchemy/Phraseanet/tmp:rw
|
- tmp_vol:/var/alchemy/Phraseanet/tmp:rw
|
||||||
- logs_vol:/var/alchemy/Phraseanet/logs:rw
|
- logs_vol:/var/alchemy/Phraseanet/logs:rw
|
||||||
- thumbnails_vol:/var/alchemy/Phraseanet/www/thumbnails:rw
|
- thumbnails_vol:/var/alchemy/Phraseanet/www/thumbnails:rw
|
||||||
@@ -117,10 +113,6 @@ volumes:
|
|||||||
driver: local
|
driver: local
|
||||||
elasticsearch_vol:
|
elasticsearch_vol:
|
||||||
driver: local
|
driver: local
|
||||||
config_vol:
|
|
||||||
driver: local
|
|
||||||
custom_vol:
|
|
||||||
driver: local
|
|
||||||
thumbnails_vol:
|
thumbnails_vol:
|
||||||
driver: local
|
driver: local
|
||||||
# to be replacer by stdout/stderr
|
# to be replacer by stdout/stderr
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
set -xe
|
set -xe
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user