forked from DSIT/documentation-dsit
Build & publish docker image
This commit is contained in:
parent
cfc0fe42b7
commit
0b2b2e6e33
27
.drone.yml
27
.drone.yml
|
@ -2,14 +2,19 @@ kind: pipeline
|
||||||
name: Build & publish main
|
name: Build & publish main
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Build mkdocs website
|
- name: publish-image
|
||||||
- name: build
|
pull: always
|
||||||
image: squidfunk/mkdocs-material
|
image: plugins/kaniko:1.7.1-kaniko1.9.1
|
||||||
commands:
|
settings:
|
||||||
- mkdocs build --site-dir public
|
auto_tag: true
|
||||||
|
auto_tag_suffix: latest
|
||||||
#Publish
|
registry: code.groupe-genes.fr
|
||||||
- name: publish
|
repo: code.groupe-genes.fr/dsit/documentation-dsit
|
||||||
image: python:latest
|
username:
|
||||||
commands:
|
from_secret: docker_username
|
||||||
- ls -alR public
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- pull_request
|
12
Dockerfile
Normal file
12
Dockerfile
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
FROM squidfunk/mkdocs-material as build
|
||||||
|
ADD mkdocs.yml .
|
||||||
|
ADD ./docs ./docs
|
||||||
|
RUN ls -al
|
||||||
|
RUN mkdocs build --site-dir /public
|
||||||
|
|
||||||
|
FROM httpd:2.4-bookworm
|
||||||
|
RUN apt update -y && apt install -y --no-install-recommends libapache2-mod-auth-openidc
|
||||||
|
RUN echo "Include conf/extra/httpd-custom-oidc.conf" >> /usr/local/apache2/conf/httpd.conf
|
||||||
|
ADD ./httpd-custom-oidc.conf /usr/local/apache2/conf/extra/
|
||||||
|
COPY --from=build /public /usr/local/apache2/htdocs/
|
||||||
|
|
23
httpd-custom-oidc.conf
Normal file
23
httpd-custom-oidc.conf
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
|
||||||
|
LoadModule auth_openidc_module /usr/lib/apache2/modules/mod_auth_openidc.so
|
||||||
|
|
||||||
|
|
||||||
|
<IfModule auth_openidc_module>
|
||||||
|
OIDCProviderIssuer https://auth.groupe-genes.fr/realms/ensae
|
||||||
|
OIDCProviderAuthorizationEndpoint https://auth.groupe-genes.fr/realms/ensae/protocol/openid-connect/auth
|
||||||
|
OIDCProviderJwksUri https://auth.groupe-genes.fr/realms/ensae/protocol/openid-connect/certs
|
||||||
|
OIDCProviderTokenEndpoint https://auth.groupe-genes.fr/realms/ensae/protocol/openid-connect/token
|
||||||
|
OIDCProviderUserInfoEndpoint https://auth.groupe-genes.fr/realms/ensae/protocol/openid-connect/userinfo
|
||||||
|
OIDCSSLValidateServer On
|
||||||
|
OIDCRedirectURI http://${SERVER_NAME}/oidc_redirect_uri
|
||||||
|
OIDCCryptoPassphrase gfdgfd
|
||||||
|
OIDCClientID ${OIDC_CLIENT}
|
||||||
|
OIDCClientSecret ${OIDC_SECRET}
|
||||||
|
OIDCRemoteUserClaim preferred_username
|
||||||
|
OIDCInfoHook userinfo
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<Location />
|
||||||
|
AuthType openid-connect
|
||||||
|
Require valid-user
|
||||||
|
</Location>
|
Loading…
Reference in New Issue
Block a user