Add woodpacker CI file
This commit is contained in:
parent
e3aa71a40a
commit
371942dbf4
13
.woodpecker.yml
Normal file
13
.woodpecker.yml
Normal 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
|
||||
@ -60,7 +60,7 @@ COPY --from=php_builder /var/www ./
|
||||
COPY --from=frontend_builder /app/public/build ./public/build
|
||||
|
||||
# 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 --link ./.docker/conf.d/05-app.ini $PHP_INI_DIR/conf.d/
|
||||
|
||||
@ -50,7 +50,7 @@ networks:
|
||||
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)
|
||||
|
||||
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).
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user