dev #6
@@ -2,6 +2,21 @@ when:
|
||||
branch: dev
|
||||
|
||||
steps:
|
||||
update_submodule:
|
||||
image: woodpeckerci/plugin-git
|
||||
secrets:
|
||||
- source: gitea_token
|
||||
target: GITEA_TOKEN
|
||||
- source: gitea_user
|
||||
target: GITEA_USER
|
||||
commands:
|
||||
- git submodule update --remote
|
||||
- if [ ! "$(git status --porcelain)" ]; then echo "no changes"; exit 0; fi
|
||||
- git config user.name "$${GITEA_USER}"
|
||||
- git config user.email "$${GITEA_USER}.gitea@narvas.tech"
|
||||
- git add -A
|
||||
- git commit -m "update submodules [skip ci]"
|
||||
- git push "https://$${GITEA_USER}:$${GITEA_TOKEN}@git.narvas.tech/$${CI_REPO}"
|
||||
check_base:
|
||||
image: vistanarvas/container-update-checker:latest
|
||||
secrets:
|
||||
@@ -27,4 +42,4 @@ steps:
|
||||
path:
|
||||
include: [ '.woodpecker/build-dev.yaml', 'build/*', 'Dockerfile' ]
|
||||
cron: nightly
|
||||
event: [push, cron, manual]
|
||||
event: [push, cron, manual]
|
||||
@@ -8,10 +8,11 @@ ARG COMPOSER_VERSION='' # composer version number like "2.1" or empty for the la
|
||||
ENV NVM_DIR="/home/$USERNAME/.nvm"
|
||||
|
||||
COPY start-container.sh /usr/local/bin/start-container
|
||||
COPY submodules/artisan-bash-completion/artisan /etc/bash_completion.d/artisan
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
||||
&& apt-get -y update \
|
||||
&& apt-get install -y curl git 7zip php php-xml php-curl php-xml php-mbstring php-mysql \
|
||||
&& apt-get install -y curl git 7zip php php-xml php-curl php-xml php-mbstring php-mysql php-gd \
|
||||
&& useradd --create-home --uid=$USER_UID $USERNAME \
|
||||
&& chmod +x /usr/local/bin/start-container \
|
||||
&& echo "install composer" \
|
||||
@@ -22,7 +23,9 @@ RUN export DEBIAN_FRONTEND=noninteractive \
|
||||
&& 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/* \
|
||||
&& chown $USERNAME:$USERNAME /var/www/html
|
||||
&& chown $USERNAME:$USERNAME /var/www/html \
|
||||
&& echo 'alias artisan="php artisan"' >> /etc/bash.bashrc \
|
||||
&& echo 'source /etc/bash_completion.d/*' >> /etc/bash.bashrc
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
|
||||
36
Readme.md
Normal file
36
Readme.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# simple-laravel
|
||||
|
||||
|
||||
|
||||
## setting laravel up in a container
|
||||
|
||||
### vite
|
||||
edit `/vite.config.js`
|
||||
```diff
|
||||
import laravel from 'laravel-vite-plugin';
|
||||
|
||||
export default defineConfig({
|
||||
+ server: {
|
||||
+ hmr: {
|
||||
+ host: '[Server Domain or IP]'
|
||||
+ },
|
||||
+ },
|
||||
plugins: [
|
||||
laravel({
|
||||
input: [
|
||||
|
||||
```
|
||||
|
||||
edit `/package.json`
|
||||
|
||||
```diff
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
- "dev": "vite",
|
||||
+ "dev": "vite --host 0.0.0.0",
|
||||
"build": "vite build"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user