Compare commits

...

10 Commits

Author SHA1 Message Date
David Bomba
de2036adff Merge pull request #640 from turbo124/debian
Fixes for tar command flags
2024-11-23 17:07:22 +11:00
David Bomba
ea8c5fed8e Fixes for tar command flags 2024-11-23 17:07:00 +11:00
David Bomba
c2f8cedc4a Merge pull request #639 from turbo124/debian
Enforce latest tags during build
2024-11-23 17:02:05 +11:00
David Bomba
7ddfe8a793 Enforce latest tags 2024-11-23 17:01:28 +11:00
David Bomba
196e66e06d updates for container 2024-11-23 16:57:44 +11:00
David Bomba
7498a94bd1 Merge pull request #638 from turbo124/debian
Update readme
2024-11-23 16:33:49 +11:00
David Bomba
8289c6c65e Update readme 2024-11-23 16:23:14 +11:00
David Bomba
b75ac4fd87 Update directory 2024-11-23 16:09:11 +11:00
David Bomba
94d3f6212e Merge pull request #636 from turbo124/debian
Update github action versions
2024-11-23 16:07:46 +11:00
David Bomba
a940bf2ed2 Update github action versions 2024-11-23 16:07:18 +11:00
4 changed files with 28 additions and 34 deletions

View File

@@ -16,7 +16,9 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v4 # Updated from v2
with:
fetch-depth: 0
- name: Prepare - name: Prepare
id: prep id: prep
@@ -30,54 +32,44 @@ jobs:
MAJOR="$(echo "${VERSION}" | cut -d. -f1)" MAJOR="$(echo "${VERSION}" | cut -d. -f1)"
MINOR="$(echo "${VERSION}" | cut -d. -f2)" MINOR="$(echo "${VERSION}" | cut -d. -f2)"
TAGS="$TAGS,${DOCKER_IMAGE}:${MAJOR},${DOCKER_IMAGE}:${MAJOR}.${MINOR}" TAGS="$TAGS,${DOCKER_IMAGE}:${MAJOR},${DOCKER_IMAGE}:${MAJOR}.${MINOR}"
if [[ $VERSION =~ ^5\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
TAGS="$TAGS,${DOCKER_IMAGE}:latest" # Debug output
fi echo "Current version: ${VERSION}"
echo ::set-output name=tags::${TAGS} echo "Version pattern check: $([[ $VERSION =~ ^5\.[0-9]{1,3}\.[0-9]{1,3}$ ]] && echo "matches" || echo "doesn't match")"
echo ::set-output name=version::${VERSION}
echo ::set-output name=major::${MAJOR} TAGS="$TAGS,${DOCKER_IMAGE}:latest"
echo "tags=${TAGS}" >> $GITHUB_OUTPUT # Updated output syntax
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "major=${MAJOR}" >> $GITHUB_OUTPUT
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v1 uses: docker/setup-qemu-action@v3 # Updated from v1
with: with:
platforms: all platforms: all
- name: Set up Docker Buildx - name: Set up Docker Buildx
id: buildx id: buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v3 # Updated from v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-${{ matrix.image }}-buildx-${{ steps.prep.outputs.major }}-${{ hashFiles('**/cache_buster') }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ matrix.image }}-buildx-${{ steps.prep.outputs.major }}-${{ hashFiles('**/cache_buster') }}-
- name: Login to DockerHub - name: Login to DockerHub
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@v1 uses: docker/login-action@v3 # Updated from v1
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }} password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push - name: Build and push
id: docker_build id: docker_build
uses: docker/build-push-action@v2 uses: docker/build-push-action@v5 # Updated from v2
with: with:
builder: ${{ steps.buildx.outputs.name }}
context: ${{ matrix.context }} context: ${{ matrix.context }}
build-args: INVOICENINJA_VERSION=${{ steps.prep.outputs.version }} build-args: INVOICENINJA_VERSION=${{ steps.prep.outputs.version }}
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.prep.outputs.tags }} tags: ${{ steps.prep.outputs.tags }}
cache-from: type=local,src=/tmp/.buildx-cache cache-from: type=gha # Updated cache type
cache-to: type=local,dest=/tmp/.buildx-cache-new cache-to: type=gha,mode=max
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Image digest - name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }} run: echo ${{ steps.docker_build.outputs.digest }}

View File

@@ -19,7 +19,7 @@ This Debian-based image includes Chrome for enhanced PDF generation and other fe
```bash ```bash
git clone https://github.com/invoiceninja/dockerfiles.git -b debian git clone https://github.com/invoiceninja/dockerfiles.git -b debian
cd dockerfiles cd dockerfiles/debian
``` ```
Instead of defining our environment variables inside our docker-compose.yml file we now define this in the `.env` file, open this file up and insert your `APP_URL`, `APP_KEY` and update the rest of the variables as required. Instead of defining our environment variables inside our docker-compose.yml file we now define this in the `.env` file, open this file up and insert your `APP_URL`, `APP_KEY` and update the rest of the variables as required.
@@ -41,7 +41,9 @@ Prior to starting the container for the first time, open the .env file and updat
This will take care of the initial account setup. You can later remove these .env variables. This will take care of the initial account setup. You can later remove these .env variables.
> ⚠️ **Warning** > ⚠️ **Warning**
> If `IN_USER_EMAIL` and `IN_PASSWORD` is not set the default user email and password is "admin@example.com" and "changeme!" respectively. You will use this for the initial login, thereafter, you can delete these two environment variables. > If `IN_USER_EMAIL` and `IN_PASSWORD` are not set the default user email and password is "admin@example.com" and "changeme!" respectively.
After the container has completed the first startup you can delete these two environment variables.
### Generate a APP_KEY ### Generate a APP_KEY

4
debian/Dockerfile vendored
View File

@@ -106,7 +106,7 @@ RUN if [ "$(dpkg --print-architecture)" = "amd64" ]; then \
&& make install \ && make install \
&& echo 'extension=saxon.so' > "/usr/local/etc/php/conf.d/app.ini"; \ && echo 'extension=saxon.so' > "/usr/local/etc/php/conf.d/app.ini"; \
fi fi
# Copy scripts # Copy scripts
COPY rootfs / COPY rootfs /
@@ -117,7 +117,7 @@ WORKDIR /var/www/html
RUN set -eux; \ RUN set -eux; \
DOWNLOAD_URL=$(curl -s "https://api.github.com/repos/invoiceninja/invoiceninja/releases/latest" | \ DOWNLOAD_URL=$(curl -s "https://api.github.com/repos/invoiceninja/invoiceninja/releases/latest" | \
grep -o '"browser_download_url": "[^"]*invoiceninja.tar"' | cut -d '"' -f 4) && \ grep -o '"browser_download_url": "[^"]*invoiceninja.tar"' | cut -d '"' -f 4) && \
curl -L "$DOWNLOAD_URL" | tar -xvz -C /var/www/html && \ curl -L "$DOWNLOAD_URL" | tar -xzf - -C /var/www/html --overwrite && \
rm -rf /var/www/html/ui && \ rm -rf /var/www/html/ui && \
chown -R www-data:www-data /var/www/html chown -R www-data:www-data /var/www/html

View File

@@ -8,7 +8,7 @@ x-logging: &default-logging
services: services:
app: app:
image: invoiceninja/invoiceninja-debian:5 image: invoiceninja/invoiceninja-debian:5.10.55-d
restart: unless-stopped restart: unless-stopped
env_file: env_file:
- ./.env - ./.env
@@ -35,7 +35,7 @@ services:
image: nginx:alpine image: nginx:alpine
restart: unless-stopped restart: unless-stopped
ports: ports:
- "80:80" - "8013:80"
volumes: volumes:
- ./nginx/conf.d:/etc/nginx/conf.d:ro - ./nginx/conf.d:/etc/nginx/conf.d:ro
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
@@ -112,4 +112,4 @@ volumes:
redis_data: redis_data:
driver: local driver: local
public_files: public_files:
driver: local driver: local