Add volumes with correct permissions
continuous-integration/drone/tag Build is passing
Details
continuous-integration/drone/tag Build is passing
Details
This commit is contained in:
parent
62d6730071
commit
f8d6cf6a92
|
@ -10,4 +10,4 @@ function wait_for_db {
|
|||
done
|
||||
}
|
||||
|
||||
php artisan horizon
|
||||
su www-data -c 'php artisan horizon'
|
||||
|
|
|
@ -15,6 +15,7 @@ WORKDIR /app
|
|||
COPY --from=node /app /app
|
||||
COPY --from=composer /app/public/vendor /app/public/vendor
|
||||
COPY ./.docker/nginx/nginx.conf /etc/nginx/nginx.conf
|
||||
RUN cd public && ln -s ../storage/app/public ./storage
|
||||
EXPOSE 80
|
||||
|
||||
VOLUME ["/app/storage/app"]
|
||||
|
|
|
@ -22,4 +22,9 @@ wait_for_db
|
|||
php -r '$connection = new PDO("mysql:host='$DB_HOST';dbname='$DB_DATABASE'", "'$DB_USERNAME'", "'$DB_PASSWORD'"); $connection->query("DESCRIBE migrations");' > /dev/null || php artisan migrate --seed --force
|
||||
php artisan migrate --force
|
||||
|
||||
mkdir /app/packages/laravel-nami/.cookies || true
|
||||
mkdir /app/storage/app || true
|
||||
chown -R www-data:www-data /app/packages/laravel-nami/.cookies
|
||||
chown -R www-data:www-data /app/storage/app
|
||||
|
||||
php-fpm -F -R -O
|
||||
|
|
|
@ -19,6 +19,11 @@ COPY --chown=www-data:www-data . /app
|
|||
COPY --chown=www-data:www-data --from=node /app/public /app/public
|
||||
COPY --chown=www-data:www-data --from=composer /app/vendor /app/vendor
|
||||
|
||||
USER www-data
|
||||
RUN php artisan telescope:publish
|
||||
RUN php artisan horizon:publish
|
||||
|
||||
USER root
|
||||
COPY ./.docker/php-entrypoint /bin/php-entrypoint
|
||||
COPY ./.docker/horizon-entrypoint /bin/horizon-entrypoint
|
||||
|
||||
|
|
|
@ -7,3 +7,4 @@ bootstrap/cache/services.php
|
|||
bootstrap/cache/packages.php
|
||||
bootstrap/cache/routes.php
|
||||
packages/laravel-nami/.cookies
|
||||
app/storage/app
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
version: '3'
|
||||
services:
|
||||
webservice:
|
||||
image: zoomyboy/adrema-webservice:latest
|
||||
depends_on:
|
||||
- php
|
||||
ports:
|
||||
- '8000:80'
|
||||
volumes:
|
||||
- ./data/storage:/app/storage/app
|
||||
|
||||
php:
|
||||
image: zoomyboy/adrema-app:latest
|
||||
depends_on:
|
||||
- db
|
||||
env_file:
|
||||
- .app.env
|
||||
environment:
|
||||
DB_HOST: db
|
||||
DB_DATABASE: db
|
||||
DB_USERNAME: db
|
||||
QUEUE_CONNECTION: redis
|
||||
XELATEX_BIN: /usr/bin/xelatex
|
||||
PDFLATEX_BIN: /usr/bin/pdflatex
|
||||
REDIS_HOST: redis
|
||||
volumes:
|
||||
- ./data/storage:/app/storage/app
|
||||
- ./cookies:/app/packages/laravel-nami/.cookies
|
||||
|
||||
horizon:
|
||||
image: zoomyboy/adrema-app:latest
|
||||
depends_on:
|
||||
- db
|
||||
- php
|
||||
command: /bin/horizon-entrypoint
|
||||
env_file:
|
||||
- .app.env
|
||||
environment:
|
||||
DB_HOST: db
|
||||
DB_DATABASE: db
|
||||
DB_USERNAME: db
|
||||
QUEUE_CONNECTION: redis
|
||||
XELATEX_BIN: /usr/bin/xelatex
|
||||
PDFLATEX_BIN: /usr/bin/pdflatex
|
||||
REDIS_HOST: redis
|
||||
volumes:
|
||||
- ./data/storage:/app/storage/app
|
||||
- ./cookies:/app/packages/laravel-nami/.cookies
|
||||
|
||||
db:
|
||||
image: mariadb:10.6.5
|
||||
env_file:
|
||||
- .app.env
|
||||
environment:
|
||||
MARIADB_RANDOM_ROOT_PASSWORD: yes
|
||||
MYSQL_DATABASE: db
|
||||
MYSQL_USER: db
|
||||
volumes:
|
||||
- ./data/db:/var/lib/mysql
|
||||
|
||||
redis:
|
||||
image: redis:alpine3.18
|
||||
container_name: redis
|
|
@ -1,16 +1,20 @@
|
|||
version: '3'
|
||||
services:
|
||||
webservice:
|
||||
image: zoomyboy/adrema-webservice:latest
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./.docker/nginx.Dockerfile
|
||||
depends_on:
|
||||
- php
|
||||
ports:
|
||||
- '8000:80'
|
||||
volumes:
|
||||
- ./storage:/app/storage/app
|
||||
- ./data/storage:/app/storage/app
|
||||
|
||||
php:
|
||||
image: zoomyboy/adrema-app:latest
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./.docker/php.Dockerfile
|
||||
depends_on:
|
||||
- db
|
||||
env_file:
|
||||
|
@ -24,11 +28,13 @@ services:
|
|||
PDFLATEX_BIN: /usr/bin/pdflatex
|
||||
REDIS_HOST: redis
|
||||
volumes:
|
||||
- ./storage:/app/storage/app
|
||||
- ./data/storage:/app/storage/app
|
||||
- ./cookies:/app/packages/laravel-nami/.cookies
|
||||
|
||||
horizon:
|
||||
image: zoomyboy/adrema-app:latest
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./.docker/php.Dockerfile
|
||||
depends_on:
|
||||
- db
|
||||
- php
|
||||
|
|
Loading…
Reference in New Issue