diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f92da7b142f506a53baa2e4028ac3e501c5919d9..531e0b40d779bfdd980550fec41ca03827fd36be 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,3 +2,20 @@ include: - project: shore/ci-templates file: templates/pre-commit.yml + - project: shore/ci-templates + file: templates/docker.yml + +stages: + - test + - build + - deploy + +build: + extends: .compose-build + tags: [ns4.shore.co.il] + +run: + extends: .compose-run + tags: [ns4.shore.co.il] + variables: + HOSTNAME: registry.shore.co.il diff --git a/Dockerfile b/Dockerfile index 0b0e2e8b82d4198679371b5f62f62c934f74c3af..1f4c4aa72febdd9b9a18888eb77d1e0cfd57fd19 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,8 +15,7 @@ RUN rm -rf /etc/nginx/conf./* && \ -keyout /var/ssl/site.key \ -nodes \ -out /var/ssl/site.crt \ - -days 2 \ - -subj "/C=US/ST=IL/L=None/O=None/OU=None/CN=localhost/" && \ + -batch && \ setcap CAP_NET_BIND_SERVICE=+ep "$(command -v nginx)" && \ chown nginx /var/ssl/site.* COPY www/ /var/www/ diff --git a/README.md b/README.md index ec8bb8ecee29b3949e0e57b55abec3dee598e02e..cefa36008036a4f56ade0f559459f53fe0f4de34 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,6 @@ > Web proxy Dockerized setup. -## Branches - -The `master` branch doesn't have any configuration in it. The `ns4` and `host01` -branches have configuration for those hoss. - ## License This software is licensed under the MIT license (see `LICENSE.txt`). diff --git a/conf.d/autoconfig.shore.co.il.conf b/conf.d/autoconfig.shore.co.il.conf new file mode 100644 index 0000000000000000000000000000000000000000..84109f9a2de57bb3bd4020467b065df47193e96f --- /dev/null +++ b/conf.d/autoconfig.shore.co.il.conf @@ -0,0 +1,21 @@ +server { + listen 80; + listen [::]:80; + server_name autoconfig.shore.co.il; + root /var/www/autoconfig.shore.co.il/; + include snippets/www-acme-challenge.conf; + include snippets/ads-txt.conf; + include snippets/security-txt.conf; + include snippets/robots-allow-all.conf; +} + +server { + listen 443 ssl; + listen [::]:443 ssl; + server_name autoconfig.shore.co.il; + root /var/www/autoconfig.shore.co.il/; + include snippets/robots-allow-all.conf; + include snippets/ads-txt.conf; + include snippets/security-txt.conf; + include snippets/ssl.conf; +} diff --git a/conf.d/registry.shore.co.il.conf b/conf.d/registry.shore.co.il.conf new file mode 100644 index 0000000000000000000000000000000000000000..07a290217a0b99b8928318c9d973ddba251e885b --- /dev/null +++ b/conf.d/registry.shore.co.il.conf @@ -0,0 +1,23 @@ +map $host $registry { default registy; } + +server { + listen 80; + listen [::]:80; + server_name registry.shore.co.il; + include snippets/www-acme-challenge.conf; + include snippets/redirect-https.conf; +} + +server { + listen 443 ssl; + listen [::]:443 ssl; + server_name registry.shore.co.il; + include snippets/ssl.conf; + + location / { + proxy_pass http://$registry$request_uri; + proxy_http_version 1.1; + include snippets/proxy-headers.conf; + include snippets/allow-private-ips.conf; + } +} diff --git a/docker-compose.yml b/docker-compose.yml index 134ca626590dcf5c820b2ed19ee2d6b444bf4f97..b5039ad9c5ae8fa4e3519c6a8dd3a4c768663f11 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,11 +10,13 @@ services: default: aliases: - *hostname + - autoconfig.shore.co.il ports: - '80:80' - '443:443' restart: always volumes: + - '/var/www/www.shore.co.il/.well-known/acme-challenge:/var/www/www.shore.co.il/.well-known/acme-challenge:ro' - '/var/ssl/site.key:/var/ssl/site.key:ro' - '/var/ssl/site.crt:/var/ssl/site.crt:ro' - '/var/ssl/dhparams:/var/ssl/dhparams:ro' diff --git a/www/autoconfig.shore.co.il/mail/config-v1.1.xml b/www/autoconfig.shore.co.il/mail/config-v1.1.xml new file mode 100644 index 0000000000000000000000000000000000000000..47a4197c6e875206ad9139865e879968cb119d3d --- /dev/null +++ b/www/autoconfig.shore.co.il/mail/config-v1.1.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<clientConfig version="1.1"> + <emailProvider id="shore.co.il"> + <domain>shore.co.il</domain> + <displayName>Shore technologies</displayName> + <displayShortName>Shore</displayShortName> + <incomingServer type="imap"> + <hostname>imap.shore.co.il</hostname> + <port>993</port> + <socketType>SSL</socketType> + <authentication>password-cleartext</authentication> + <username>%EMAILLOCALPART%</username> + </incomingServer> + <outgoingServer type="smtp"> + <hostname>smtp.shore.co.il</hostname> + <port>587</port> + <socketType>STARTTLS</socketType> + <authentication>password-cleartext</authentication> + <username>%EMAILLOCALPART%</username> + </outgoingServer> + </emailProvider> +</clientConfig> +