Add woodpacker CI file

This commit is contained in:
bastian 2025-02-14 12:53:00 +01:00
parent e3aa71a40a
commit 371942dbf4
3 changed files with 15 additions and 2 deletions

13
.woodpecker.yml Normal file
View File

@ -0,0 +1,13 @@
steps:
build:
image: docker
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
IMAGE_NAME: gitea.b7d.nl/${CI_REPO_OWNER}/${CI_REPO_NAME}
commands:
- docker login gitea.b7d.nl -u $GITEA_USER -p $GITEA_TOKEN
- docker build -t $IMAGE_NAME:$CI_COMMIT_SHA -f Dockerfile-prod .
- docker tag $IMAGE_NAME:$CI_COMMIT_SHA $IMAGE_NAME:latest
- docker push $IMAGE_NAME:$CI_COMMIT_SHA
- docker push $IMAGE_NAME:latest

View File

@ -60,7 +60,7 @@ COPY --from=php_builder /var/www ./
COPY --from=frontend_builder /app/public/build ./public/build COPY --from=frontend_builder /app/public/build ./public/build
# Clean up # Clean up
RUN rm -rf .DS_Store .idea .env.local /var/www/html /var/www/var/cache/dev Dockerfile* compose.yaml .git LICENSE README.md node_modules RUN rm -rf .DS_Store .idea .env.local /var/www/html /var/www/var/cache/dev Dockerfile* compose.yaml .git LICENSE README.md node_modules .woodpecker.yml
# Copy settings for PHP-FPM # Copy settings for PHP-FPM
COPY --link ./.docker/conf.d/05-app.ini $PHP_INI_DIR/conf.d/ COPY --link ./.docker/conf.d/05-app.ini $PHP_INI_DIR/conf.d/

View File

@ -50,7 +50,7 @@ networks:
driver: bridge driver: bridge
``` ```
* Create a proper .env.local file in the PHP container that matches the database settings * Create a proper `.env.local` file in the PHP container that matches the database settings
* Change the Nginx container port mapping if needed (e.g. 8080:80, where you can reach the app on localhost:8080) * Change the Nginx container port mapping if needed (e.g. 8080:80, where you can reach the app on localhost:8080)
Now run `docker compose up -d`. If successful, you can reach the app on http://localhost:80 (if you didn't change the port mapping). Now run `docker compose up -d`. If successful, you can reach the app on http://localhost:80 (if you didn't change the port mapping).