forked from grams/docker-LTB-self-service-password
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from theohbrothers/change/remove-v-prefix-from…
…-docker-tags Change: Remove `v` prefix from docker tags
- Loading branch information
Showing
7 changed files
with
417 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# This script is to update versions in versions.json, create PR(s) for each bumped version, merge PRs, and release | ||
# It may be run manually or as a cron | ||
# Use -WhatIf for dry run | ||
[CmdletBinding(SupportsShouldProcess)] | ||
param ( | ||
[Parameter(HelpMessage="Whether to clone a temporary repo before opening PRs. Useful in development")] | ||
[switch]$CloneTempRepo | ||
, | ||
[Parameter(HelpMessage="Whether to open a PR for each updated version in version.json")] | ||
[switch]$PR | ||
, | ||
[Parameter(HelpMessage="Whether to merge each PR one after another (note that this is not GitHub merge queue which cannot handle merge conflicts). The queue ensures each PR is rebased to prevent merge conflicts")] | ||
[switch]$AutoMergeQueue | ||
, | ||
[Parameter(HelpMessage="Whether to create a tagged release and closing milestone, after merging all PRs")] | ||
[switch]$AutoRelease | ||
, | ||
[Parameter(HelpMessage="-AutoRelease tag convention")] | ||
[ValidateSet('calver', 'semver')] | ||
[string]$AutoReleaseTagConvention = 'calver' | ||
) | ||
$ErrorActionPreference = 'Stop' | ||
Set-StrictMode -Version Latest | ||
|
||
# Install modules | ||
@( | ||
'Generate-DockerImageVariantsHelpers' | ||
'Powershell-Yaml' | ||
) | % { | ||
if (! (Get-InstalledModule $_ -ErrorAction SilentlyContinue) ) { | ||
Install-Module $_ -Scope CurrentUser -Force | ||
} | ||
} | ||
# Override with development module if it exists | ||
if (Test-Path ../Generate-DockerImageVariantsHelpers/src/Generate-DockerImageVariantsHelpers) { | ||
Import-module ../Generate-DockerImageVariantsHelpers/src/Generate-DockerImageVariantsHelpers -Force | ||
} | ||
|
||
try { | ||
if ($CloneTempRepo) { | ||
$repo = Clone-TempRepo | ||
Push-Location $repo | ||
} | ||
|
||
# Update versions.json, and open PRs with CI disabled | ||
$prs = Update-DockerImageVariantsVersions -CommitPreScriptblock { Move-Item .github .github.disabled -Force } -PR:$PR -WhatIf:$WhatIfPreference | ||
# Update versions.json, update PRs with CI, merge PRs one at a time, release and close milestone | ||
$return = Update-DockerImageVariantsVersions -PR:$PR -AutoMergeQueue:$AutoMergeQueue -AutoRelease:$AutoRelease -AutoReleaseTagConvention $AutoReleaseTagConvention -WhatIf:$WhatIfPreference | ||
}catch { | ||
throw | ||
}finally { | ||
if ($CloneTempRepo) { | ||
Pop-Location | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Use this container to download the .deb because the SSL certs are expired in phusion/baseimage:0.9.16 | ||
FROM alpine:3.14 AS build | ||
RUN wget -q https://ltb-project.org/archives/self-service-password_1.3-1_all.deb -O /self-service-password.deb | ||
|
||
FROM phusion/baseimage:0.9.16 AS final | ||
|
||
# Use baseimage-docker's init system. | ||
CMD ["/sbin/my_init"] | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# Install Apache2, PHP and LTB ssp | ||
RUN apt-get update && apt-get install -y ca-certificates apache2 php5 php5-mcrypt php5-ldap && apt-get clean | ||
COPY --from=build /self-service-password.deb . | ||
RUN dpkg -i self-service-password.deb ; rm -f self-service-password.deb | ||
|
||
# Log to stdout | ||
RUN sed -i 's#/var/log/apache2/ssp_error.log#/dev/stdout#g' `dpkg -L self-service-password | grep -w 'self-service-password\.conf'` \ | ||
&& sed -i 's#/var/log/apache2/ssp_access.log#/dev/stdout#g' `dpkg -L self-service-password | grep -w 'self-service-password\.conf'` | ||
|
||
# Configure self-service-password site | ||
RUN ln -s ../../mods-available/mcrypt.ini /etc/php5/apache2/conf.d/20-mcrypt.ini | ||
RUN a2dissite 000-default && a2ensite self-service-password | ||
|
||
# This is where configuration goes | ||
ADD assets/config.inc.php /usr/share/self-service-password/conf/config.inc.php | ||
|
||
# Start Apache2 as runit service | ||
RUN mkdir /etc/service/apache2 | ||
ADD assets/apache2.sh /etc/service/apache2/run | ||
|
||
EXPOSE 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
exec /usr/sbin/apache2ctl -DFOREGROUND -k start | ||
|
Oops, something went wrong.