Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ssl command to download mkcert and generate ssl certificates #465

Merged
merged 45 commits into from
May 6, 2022
Merged
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
480f504
Add ssl command to download mkcert and generate ssl certificates
shadyvb Apr 22, 2022
3b1dd4f
Add link to install mkcert after errors installing it
shadyvb Apr 25, 2022
824746e
Remove redundant return statement
shadyvb Apr 25, 2022
901b3b9
Improve logging around errors with ssl
shadyvb Apr 26, 2022
afad00a
Remove redundant output
shadyvb Apr 26, 2022
f2786f9
Removed duplicate handling of get_mkcert_binary()
shadyvb Apr 26, 2022
9441243
Fix docblock
shadyvb Apr 26, 2022
26494bd
:nail_care: Fix CS
shadyvb Apr 26, 2022
b0bb233
Programmatically create SSL certificate and use with Traefik
shadyvb Apr 23, 2022
1be8adf
Allow custom domain name/tld from #341
shadyvb Apr 26, 2022
60baaf5
Fix function args
shadyvb Apr 23, 2022
aa942fc
Fix an error with the run command
shadyvb Apr 27, 2022
5c025de
Skip verifying https for S3 requests
shadyvb Apr 27, 2022
97e4ce9
Try to fix s3 bucket/path mapping
shadyvb Apr 27, 2022
cfec957
Better detect WSL environment
shadyvb Apr 28, 2022
9827897
Restart the proxy container after generating a certificate
shadyvb May 3, 2022
7f36778
Add support for extra custom domains
shadyvb May 3, 2022
af3b6c0
Stop starting if domain has changed to avoid orphan containers
shadyvb May 3, 2022
859114c
Only attempt to restart the proxy container if it is running
shadyvb May 3, 2022
e28a24a
Check if secure is set to false to avoid generating SSL certificate
shadyvb May 3, 2022
e259410
Revert "Check if secure is set to false to avoid generating SSL certi…
shadyvb May 3, 2022
e20718a
:nail_care: CS polish
shadyvb May 3, 2022
578c219
Install mkcert for tests
shadyvb May 3, 2022
4091cad
Add note on mkcert installation url and location
shadyvb May 3, 2022
b50194c
More verbose output on detected os arch
shadyvb May 3, 2022
6b9708f
Fix arch detection for linux
shadyvb May 3, 2022
ef984c4
Fix missing name/tld config
shadyvb May 3, 2022
a3d42f8
Fix missing domains config key
shadyvb May 3, 2022
ce9fb0c
Merge remote-tracking branch 'origin/master' into product-dev-987/ssl…
shadyvb May 3, 2022
2a73d9f
Test connectivity to site in CI
shadyvb May 3, 2022
81ab150
Add aux service URLs to generated certificate
shadyvb May 4, 2022
90ce957
Fix S3 and Tachyon issues with bucket path
shadyvb May 4, 2022
4e6fd76
Add a warning for missing hosts entries
shadyvb May 4, 2022
7c0a020
Fix indentation
shadyvb May 4, 2022
8a79a58
Remove relative path use in traefik config
shadyvb May 4, 2022
2634b85
Fix generation of hosts entries note
shadyvb May 4, 2022
0d6430e
Fix generation of cert around default domain
shadyvb May 4, 2022
6c187a1
Less testing output
shadyvb May 4, 2022
bd8eabc
Do not generate SSL for altis.dev
shadyvb May 4, 2022
37518b7
More efficient domain selection
shadyvb May 4, 2022
b164550
Correct typo
shadyvb May 4, 2022
72c6318
Add traefik.domain label for future multi-instance SSL generation
shadyvb May 4, 2022
b008194
Return instead of exit
shadyvb May 5, 2022
4e26c8f
Document custom domains and SSL command features
shadyvb May 5, 2022
2f11c98
Move SSL generation out of experimental section
shadyvb May 6, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ before_script:
- cd $HOME/test-root && composer require -W "$ALTIS_PACKAGE:dev-${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH} as `jq \".\\\"packages-dev\\\"[] | select (.name==\\\"$ALTIS_PACKAGE\\\") | .version\" composer.lock | sed -e 's/\"//g;/^dev/q;s/\$/9/'`"

script:
- cd $HOME/test-root && composer server ssl install
- cd $HOME/test-root && composer server start
- cd $HOME/test-root && composer server db info
- cd $HOME/test-root && composer server db exec -- "select * from wp_site;"
- cd $HOME/test-root && composer server status
- cd $HOME/test-root && composer server exec -- ls -al
- cd $HOME/test-root && composer server cli site list
- cd $HOME/test-root && composer server start --xdebug=debug,profile
- curl https://test-root.altis.dev/ | grep '<title>'
- cd $HOME/test-root && composer server exec printenv | grep XDEBUG_MODE=debug,profile
- curl -XGET https://test-root.altis.dev/webgrind/ | grep '<title>webgrind</title>'
- cd $HOME/test-root && composer server stop --clean
Expand Down
6 changes: 3 additions & 3 deletions docker/conf/traefik.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ insecureSkipVerify = true
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[[entryPoints.https.tls.certificates]]
certFile = "/etc/traefik/sni/cert/altis.pem"
keyFile = "/etc/traefik/sni/key/altis.pem"
[entryPoints.https.tls.defaultCertificate]
certFile = "/etc/traefik/ssl-cert.pem"
keyFile = "/etc/traefik/ssl-key.pem"

[web]
address = ":8080"
Expand Down
7 changes: 3 additions & 4 deletions docker/proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ services:
image: traefik:1.7
container_name: altis-proxy
volumes:
- "$PWD/conf/traefik.toml:/etc/traefik/traefik.toml"
- "$PWD/ssl.cert:/etc/traefik/ssl.cert"
- "$PWD/ssl.key:/etc/traefik/ssl.key"
- "$PWD/sni:/etc/traefik/sni"
- "$PWD/altis/local-server/docker/conf/traefik.toml:/etc/traefik/traefik.toml"
- "$PWD/ssl-cert.pem:/etc/traefik/ssl-cert.pem"
- "$PWD/ssl-key.pem:/etc/traefik/ssl-key.pem"
- /var/run/docker.sock:/var/run/docker.sock
ports:
- '8080:8080'
Expand Down
139 changes: 0 additions & 139 deletions docker/sni/cert/altis.pem

This file was deleted.

28 changes: 0 additions & 28 deletions docker/sni/key/altis.pem

This file was deleted.

Loading