dev (#2)
Reviewed-on: #2 [SKIP CI]
This commit was merged in pull request #2.
This commit is contained in:
30
.woodpecker/build-dev.yaml
Normal file
30
.woodpecker/build-dev.yaml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
when:
|
||||||
|
branch: dev
|
||||||
|
|
||||||
|
pipeline:
|
||||||
|
check_base:
|
||||||
|
image: vistanarvas/container-update-checker:latest
|
||||||
|
secrets:
|
||||||
|
- source: dockerhub_token
|
||||||
|
target: docker_password
|
||||||
|
environment:
|
||||||
|
DOCKER_USERNAME: vistanarvas
|
||||||
|
BASE: ubuntu:latest
|
||||||
|
TARGET: vistanarvas/${CI_REPO_NAME}:latest
|
||||||
|
when:
|
||||||
|
cron: nightly
|
||||||
|
event: cron
|
||||||
|
build_and_publish:
|
||||||
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
|
settings:
|
||||||
|
username: vistanarvas
|
||||||
|
password:
|
||||||
|
from_secret: DOCKERHUB_TOKEN
|
||||||
|
context: ./build
|
||||||
|
repo: vistanarvas/${CI_REPO_NAME}
|
||||||
|
tag: dev
|
||||||
|
when:
|
||||||
|
path:
|
||||||
|
include: [ '.woodpecker/build-dev.yaml', 'build/*', 'Dockerfile' ]
|
||||||
|
cron: nightly
|
||||||
|
event: [push, tag, deployment, cron, manual]
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
when:
|
||||||
|
branch: master
|
||||||
|
|
||||||
pipeline:
|
pipeline:
|
||||||
check_base:
|
check_base:
|
||||||
image: vistanarvas/container-update-checker:latest
|
image: vistanarvas/container-update-checker:latest
|
||||||
@@ -18,11 +21,10 @@ pipeline:
|
|||||||
password:
|
password:
|
||||||
from_secret: DOCKERHUB_TOKEN
|
from_secret: DOCKERHUB_TOKEN
|
||||||
context: ./build
|
context: ./build
|
||||||
dockerfile: ./build/Dockerfile
|
|
||||||
repo: vistanarvas/${CI_REPO_NAME}
|
repo: vistanarvas/${CI_REPO_NAME}
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
when:
|
when:
|
||||||
path:
|
path:
|
||||||
include: [ '.woodpecker/build.yml', 'build/*' ]
|
include: [ '.woodpecker/build.yml', 'build/*', 'Dockerfile' ]
|
||||||
cron: nightly
|
cron: nightly
|
||||||
event: [push, tag, deployment, cron, manual]
|
event: [push, tag, deployment, cron, manual]
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ ARG COMPOSER_VERSION='' # composer version number like "2.1" or empty for the la
|
|||||||
|
|
||||||
ENV NVM_DIR="/home/$USERNAME/.nvm"
|
ENV NVM_DIR="/home/$USERNAME/.nvm"
|
||||||
|
|
||||||
COPY start-container /usr/local/bin/start-container
|
COPY start-container.sh /usr/local/bin/start-container
|
||||||
|
|
||||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
RUN export DEBIAN_FRONTEND=noninteractive \
|
||||||
&& apt-get -y update \
|
&& apt-get -y update \
|
||||||
@@ -21,7 +21,8 @@ RUN export DEBIAN_FRONTEND=noninteractive \
|
|||||||
&& sha384sum -c composer-setup.sig \
|
&& sha384sum -c composer-setup.sig \
|
||||||
&& if [ -n "$COMPOSER_VERSION" ]; then COMPOSER_VERSION="--${COMPOSER_VERSION}"; fi \
|
&& if [ -n "$COMPOSER_VERSION" ]; then COMPOSER_VERSION="--${COMPOSER_VERSION}"; fi \
|
||||||
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer $COMPOSER_VERSION \
|
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer $COMPOSER_VERSION \
|
||||||
&& rm composer-setup.php composer-setup.sig /var/www/html/*
|
&& rm composer-setup.php composer-setup.sig /var/www/html/* \
|
||||||
|
&& chown $USERNAME:$USERNAME /var/www/html
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
@@ -35,6 +36,6 @@ RUN echo "install nvm and node" \
|
|||||||
&& echo "source $NVM_DIR/nvm.sh" >> /home/$USERNAME/.bashrc \
|
&& echo "source $NVM_DIR/nvm.sh" >> /home/$USERNAME/.bashrc \
|
||||||
&& [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" \
|
&& [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" \
|
||||||
&& nvm install $NODE_VERSION \
|
&& nvm install $NODE_VERSION \
|
||||||
&& nvm alias default $NODE_VERSION \
|
&& nvm alias default $NODE_VERSION
|
||||||
|
|
||||||
ENTRYPOINT ["start-container"]
|
ENTRYPOINT ["start-container"]
|
||||||
@@ -3,6 +3,9 @@
|
|||||||
# exit when any command fails
|
# exit when any command fails
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# init nvm
|
||||||
|
\. $NVM_DIR/nvm.sh
|
||||||
|
|
||||||
if [ ! -f /var/www/html/artisan ]; then
|
if [ ! -f /var/www/html/artisan ]; then
|
||||||
echo "No existing Laravel project found"
|
echo "No existing Laravel project found"
|
||||||
composer create-project laravel/laravel /var/www/html "$LARAVEL_VERSION"
|
composer create-project laravel/laravel /var/www/html "$LARAVEL_VERSION"
|
||||||
Reference in New Issue
Block a user