diff --git a/docker-compose.yml b/dev/docker-compose.yml similarity index 72% rename from docker-compose.yml rename to dev/docker-compose.yml index 26f783cb6..44560ad9d 100644 --- a/docker-compose.yml +++ b/dev/docker-compose.yml @@ -19,23 +19,23 @@ services: - db:/var/lib/mysql app: build: - context: . - dockerfile: docker/dev/Dockerfile + context: .. + dockerfile: ./dev/docker/Dockerfile environment: DB_CONNECTION: mysql DB_HOST: db DB_PORT: 3306 DB_DATABASE: bookstack-test - DB_USER: bookstack-test + DB_USERNAME: bookstack-test DB_PASSWORD: bookstack-test ports: - - ${DEV_PORT}:80 + - ${DEV_PORT:-8080}:80 volumes: - - ./:/app - entrypoint: /app/docker/dev/entrypoint.app.sh + - ../:/app + entrypoint: /app/dev/docker/entrypoint.app.sh node: image: node:alpine working_dir: /app volumes: - - ./:/app - entrypoint: /app/docker/dev/entrypoint.node.sh + - ../:/app + entrypoint: /app/dev/docker/entrypoint.node.sh diff --git a/docker/dev/Dockerfile b/dev/docker/Dockerfile similarity index 100% rename from docker/dev/Dockerfile rename to dev/docker/Dockerfile diff --git a/docker/dev/entrypoint.app.sh b/dev/docker/entrypoint.app.sh similarity index 60% rename from docker/dev/entrypoint.app.sh rename to dev/docker/entrypoint.app.sh index aa2144d81..ff44f0c8d 100755 --- a/docker/dev/entrypoint.app.sh +++ b/dev/docker/entrypoint.app.sh @@ -2,11 +2,13 @@ set -e -if [[ "$1" == "composer" ]]; then +env + +if [[ -n "$1" ]]; then exec "$@" else wait-for-it db:3306 -t 45 - php artisan migrate --database=mysql_docker_dev + php artisan migrate --database=mysql chown -R www-data:www-data storage exec apache2-foreground fi \ No newline at end of file diff --git a/docker/dev/entrypoint.node.sh b/dev/docker/entrypoint.node.sh similarity index 100% rename from docker/dev/entrypoint.node.sh rename to dev/docker/entrypoint.node.sh