diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index df02450b..568692f7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,7 +27,7 @@ staging: - chmod 400 ~/.ssh/id_rsa - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' script: - - ssh izyim@40.76.84.105 "cd exchange && git pull origin master && sudo docker-compose -f docker-prod.yml up -d" + - ssh admin@exchange-staging.izyim.com "cd exchange && git pull origin master && sudo docker-compose -f docker-prod.yml up -d" environment: name: staging url: https://exchange-staging.izyim.com/ diff --git a/Dockerfile b/Dockerfile index e5570779..b04c39b3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,6 @@ RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-di RUN docker-php-ext-install pdo pdo_mysql zip gd WORKDIR /app ADD . /app -RUN chown -R www-data:www-data /app RUN chmod 755 /app/storage RUN chmod 777 -R /app/bootstrap/cache @@ -23,5 +22,6 @@ RUN php artisan clear-compiled COPY wait.sh /usr/local/bin/wait.sh RUN chmod +x /usr/local/bin/wait.sh +RUN chown -R www-data:www-data /app CMD /usr/local/bin/wait.sh && composer update --no-scripts && composer dumpautoload && php artisan migrate && php artisan serve --host=0.0.0.0 --port=8000 EXPOSE 8000 diff --git a/caddy/Dockerfile b/caddy/Dockerfile index a36b4ea1..b3bb7a34 100644 --- a/caddy/Dockerfile +++ b/caddy/Dockerfile @@ -15,5 +15,6 @@ COPY Caddyfile /etc/Caddyfile WORKDIR /var/www RUN mkdir -p /var/www/public/storage RUN ln -sf /var/www/storage/app/public /var/www/public/storage +RUN chmod -R 777 storage/ CMD ["/usr/bin/caddy", "--conf", "/etc/Caddyfile", "--log", "stdout"] \ No newline at end of file