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:
|
||||
check_base:
|
||||
image: vistanarvas/container-update-checker:latest
|
||||
@@ -18,11 +21,10 @@ pipeline:
|
||||
password:
|
||||
from_secret: DOCKERHUB_TOKEN
|
||||
context: ./build
|
||||
dockerfile: ./build/Dockerfile
|
||||
repo: vistanarvas/${CI_REPO_NAME}
|
||||
auto_tag: true
|
||||
when:
|
||||
path:
|
||||
include: [ '.woodpecker/build.yml', 'build/*' ]
|
||||
include: [ '.woodpecker/build.yml', 'build/*', 'Dockerfile' ]
|
||||
cron: nightly
|
||||
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"
|
||||
|
||||
COPY start-container /usr/local/bin/start-container
|
||||
COPY start-container.sh /usr/local/bin/start-container
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
||||
&& apt-get -y update \
|
||||
@@ -21,7 +21,8 @@ RUN export DEBIAN_FRONTEND=noninteractive \
|
||||
&& sha384sum -c composer-setup.sig \
|
||||
&& if [ -n "$COMPOSER_VERSION" ]; then COMPOSER_VERSION="--${COMPOSER_VERSION}"; fi \
|
||||
&& 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
|
||||
|
||||
@@ -35,6 +36,6 @@ RUN echo "install nvm and node" \
|
||||
&& echo "source $NVM_DIR/nvm.sh" >> /home/$USERNAME/.bashrc \
|
||||
&& [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" \
|
||||
&& nvm install $NODE_VERSION \
|
||||
&& nvm alias default $NODE_VERSION \
|
||||
&& nvm alias default $NODE_VERSION
|
||||
|
||||
ENTRYPOINT ["start-container"]
|
||||
@@ -3,6 +3,9 @@
|
||||
# exit when any command fails
|
||||
set -e
|
||||
|
||||
# init nvm
|
||||
\. $NVM_DIR/nvm.sh
|
||||
|
||||
if [ ! -f /var/www/html/artisan ]; then
|
||||
echo "No existing Laravel project found"
|
||||
composer create-project laravel/laravel /var/www/html "$LARAVEL_VERSION"
|
||||
Reference in New Issue
Block a user