Skip to content

Commit

Permalink
Added new images with full SQL support
Browse files Browse the repository at this point in the history
  • Loading branch information
ogarcia committed May 2, 2022
1 parent 41a4e5a commit 383725c
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 66 deletions.
3 changes: 3 additions & 0 deletions .circleci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ apk --no-progress add gcc musl-dev zlib-dev jpeg-dev libjpeg-turbo

# install python deps
pip install flup
[[ ${DOCKER_TAG} == *sql ]] && \
pip install pymysql && \
pip install psycopg2-binary

# extract software
cd /supysonic/src/
Expand Down
102 changes: 37 additions & 65 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,46 @@ jobs:

workflows:
version: 2
build-deploy-base:
build-deploy:
jobs:
- build:
matrix:
parameters:
docker-tag:
- base
- sql
- ffmpeg
- ffmpeg-sql
- full
- full-sql
filters:
tags:
only: /.*/
- test:
matrix:
parameters:
docker-tag:
- base
- sql
- ffmpeg
- ffmpeg-sql
- full
- full-sql
requires:
- build
filters:
tags:
only: /.*/
- publish-dockerhub:
matrix:
parameters:
docker-tag:
- base
- sql
- ffmpeg
- ffmpeg-sql
- full
- full-sql
requires:
- test
filters:
Expand All @@ -111,70 +138,15 @@ workflows:
branches:
ignore: /.*/
- publish-quay:
requires:
- test
filters:
tags:
only: /.*/
branches:
ignore: /.*/
build-deploy-ffmpeg:
jobs:
- build:
docker-tag: ffmpeg
filters:
tags:
only: /.*/
- test:
docker-tag: ffmpeg
requires:
- build
filters:
tags:
only: /.*/
- publish-dockerhub:
docker-tag: ffmpeg
requires:
- test
filters:
tags:
only: /.*/
branches:
ignore: /.*/
- publish-quay:
docker-tag: ffmpeg
requires:
- test
filters:
tags:
only: /.*/
branches:
ignore: /.*/
build-deploy-full:
jobs:
- build:
docker-tag: full
filters:
tags:
only: /.*/
- test:
docker-tag: full
requires:
- build
filters:
tags:
only: /.*/
- publish-dockerhub:
docker-tag: full
requires:
- test
filters:
tags:
only: /.*/
branches:
ignore: /.*/
- publish-quay:
docker-tag: full
matrix:
parameters:
docker-tag:
- base
- sql
- ffmpeg
- ffmpeg-sql
- full
- full-sql
requires:
- test
filters:
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ ARG SUPYSONIC_VERSION
COPY .circleci /supysonic/build
ADD https://github.com/spl0k/supysonic/archive/${SUPYSONIC_VERSION}.tar.gz \
/supysonic/src/supysonic.tar.gz
ARG DOCKER_TAG
ENV DOCKER_TAG=${DOCKER_TAG}
RUN /supysonic/build/build.sh

FROM alpine:${ALPINE_VERSION}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ifndef QUAY_PASSWORD
endif

docker-build:
docker buildx build -t $(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE):$(DOCKER_TAG) --build-arg ALPINE_VERSION=$(ALPINE_VERSION) --build-arg PYTHON_VERSION=$(PYTHON_VERSION)-alpine$(ALPINE_VERSION) --build-arg SUPYSONIC_VERSION=$(SUPYSONIC_VERSION) --build-arg EXTRA_PACKAGES="$(shell cat tags/$(DOCKER_TAG)-packages)" .
docker buildx build -t $(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE):$(DOCKER_TAG) --build-arg ALPINE_VERSION=$(ALPINE_VERSION) --build-arg PYTHON_VERSION=$(PYTHON_VERSION)-alpine$(ALPINE_VERSION) --build-arg SUPYSONIC_VERSION=$(SUPYSONIC_VERSION) --build-arg DOCKER_TAG=$(DOCKER_TAG) --build-arg EXTRA_PACKAGES="$(shell cat tags/$(DOCKER_TAG)-packages)" .

docker-test:
docker image inspect $(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE):$(DOCKER_TAG)
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,28 @@ Visit [Docker Hub][4] or [Quay][5] to see all available tags.
[4]: https://hub.docker.com/r/ogarcia/supysonic/
[5]: https://quay.io/repository/ogarcia/supysonic

## Available tags

At this moment, the following images are building.

- **base**: default Supysonic image with SQLite support.
- **sql**: full SQL support (MySQL and PostgreSQL).
- **ffmpeg**: base image with ffmpeg added for transcoding.
- **ffmpeg-sql**: ffmpeg and full SQL support.
- **full**: all transcoding packages added (see `tags/full-packages`).
- **full-sql**: all packages and full SQL support.

Tag format used is as following.

- base: `base-VERSION`, `base`, `latest`
- sql: `sql-VERSION`, `sql`
- ffmpeg: `ffmpeg-VERSION`, `ffmpeg`
- ffmpeg-sql: `ffmpeg-sql-VERSION`, `ffmpeg-sql`
- full: `full-VERSION`, `full`
- full-sql: `full-sql-VERSION`, `full-sql`

Old images are archived with format `TAG-VERSION`.

## Run

To run this container simply run.
Expand Down
1 change: 1 addition & 0 deletions tags/ffmpeg-sql-packages
1 change: 1 addition & 0 deletions tags/full-sql-packages

0 comments on commit 383725c

Please sign in to comment.