Skip to content

Commit

Permalink
Update Docker build and publish workflow and
Browse files Browse the repository at this point in the history
Dockerfiles
  • Loading branch information
jaydrogers committed Nov 9, 2023
1 parent 8744c66 commit 9ad071c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/service_docker-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
dockerfile:
type: string
default: './Dockerfile'
target:
type: string
default: 'deploy'

jobs:
php-build-and-test:
Expand Down Expand Up @@ -41,10 +44,11 @@ jobs:
fail-on-cache-miss: true

- name: docker-build-action
uses: serversideup/github-action-docker-build@v2
uses: serversideup/github-action-docker-build@v3
with:
tags: "${{ inputs.docker-tags }}"
dockerfile: "${{ inputs.dockerfile }}"
registry-username: ${{ secrets.DOCKER_HUB_USERNAME }}
registry-token: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
platforms: "${{ inputs.platforms }}"
platforms: "${{ inputs.platforms }}"
target: "${{ inputs.target }}"
5 changes: 4 additions & 1 deletion Dockerfile.node
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM node:20
FROM node:20 as base

### Development
FROM base as development
ARG USER_ID

RUN usermod -u $USER_ID node
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
FROM serversideup/php:beta-8.2.12-unit-bookworm as base
LABEL maintainer="Server Side Up <@serversideup>"

### Development
FROM base as development
ARG USER_ID

RUN usermod -u $USER_ID www-data

# Copy the application with the correct permissions
### Deploy
FROM base as deploy
LABEL maintainer="Server Side Up <@serversideup>"
COPY --chown=9999:9999 . /var/www/html
1 change: 1 addition & 0 deletions docker-compose.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ services:
build:
context: .
dockerfile: Dockerfile.node
target: base
networks:
- ci
volumes:
Expand Down

0 comments on commit 9ad071c

Please sign in to comment.