Skip to content

Commit

Permalink
just get this thing healthy again
Browse files Browse the repository at this point in the history
  • Loading branch information
pirog committed Oct 24, 2024
1 parent 0668f73 commit 9e40f0c
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-apache-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
os:
- ubuntu-24.04
node-version:
- '18'
- '20'
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-docs-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
os:
- ubuntu-24.04
node-version:
- '18'
- '20'
steps:
# Install deps and cache
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
os:
- ubuntu-24.04
node-version:
- '18'
- '20'
steps:
# Install deps and cache
- name: Checkout code
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
os:
- windows-2022
- ubuntu-24.04
- macos-12
- macos-13
node-version:
- '18'
- '20'
steps:
# Install deps and cache
- name: Checkout code
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,23 @@ jobs:
# Deploy
- name: Publish to npm
run: |
VERSION=$(node -p "require('./package.json').version")
PACKAGE=$(node -p "require('./package.json').name")
if [ "${{ github.event.release.prerelease }}" == "false" ]; then
npm publish --access public --dry-run
npm publish --access public
VERSION=$(node -p "require('./package.json').version")
PACKAGE_NAME=$(node -p "require('./package.json').name")
npm dist-tag add $PACKAGE_NAME@$VERSION edge
echo "::notice title=Updated edge tag::The edge tag now points to $VERSION"
echo "::notice title=Published ${{ github.ref_name }} to @${{ github.repository }}::This is a stable release published to the default 'latest' npm tag"
npm dist-tag add "$PACKAGE@$VERSION" edge
echo "::notice title=Published $VERSION to $PACKAGE::This is a stable release published to the default 'latest' npm tag"
echo "::notice title=Updated latest tag to $VERSION::The stable tag now points to $VERSION"
echo "::notice title=Updated edge tag to $VERSION::The edge tag now points to $VERSION"
else
npm publish --access public --tag edge --dry-run
npm publish --access public --tag edge
echo "::notice title=Published ${{ github.ref_name }} to @${{ github.repository }}@edge::This is a pre-release published to the 'edge' npm tag"
echo "::notice title=Published $VERSION to $PACKAGE::This is a prerelease published to the 'edge' npm tag"
echo "::notice title=Updated edge tag to $VERSION::The edge tag now points to $VERSION"
fi
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_DEPLOY_TOKEN}}
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
20
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Add a `apache` service to your Landofile
```yaml
services:
myservice:
type: apache
type: apache:2.4
```
For more info you should check out the [docs](https://docs.lando.dev/apache):
Expand Down Expand Up @@ -50,4 +50,4 @@ Made with [contributors-img](https://contrib.rocks).
## Other Selected Resources
* [LICENSE](https://github.com/lando/apache/blob/main/LICENSE.md)
* [The best professional advice ever](https://www.youtube.com/watch?v=tkBVDh7my9Q)
* [The best professional advice ever](https://www.youtube.com/watch?v=tkBVDh7my9Q)
27 changes: 17 additions & 10 deletions builders/apache.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ module.exports = {
server: 'httpd.conf',
vhosts: 'default.conf',
},
environment: {
APACHE_HTTP_PORT_NUMBER: '80',
APACHE_USER: 'www-data',
APACHE_GROUP: 'www-data',
LANDO_NEEDS_EXEC: 'DOEEET',
},
ports: ['80'],
remoteFiles: {
server: '/opt/bitnami/apache/conf/httpd.conf',
vhosts: '/opt/bitnami/apache/conf/vhosts/lando.conf',
Expand All @@ -31,21 +38,21 @@ module.exports = {
// Constructor
constructor(id, options = {}) {
options = _.merge({}, config, options);
// Use different default for ssl
if (options.ssl) options.defaultFiles.vhosts = 'default-ssl.conf';

// Use different config for ssl
if (options.ssl) {
options.defaultFiles.vhosts = 'default-ssl.conf';
options.environment.APACHE_HTTPS_PORT_NUMBER = '443';
options.ports.push('443');
}

// Build the default stuff here
const apache = {
image: `bitnami/apache:${options.version}`,
command: '/launch.sh',
environment: {
APACHE_HTTP_PORT_NUMBER: '80',
APACHE_HTTPS_PORT_NUMBER: '443',
APACHE_USER: 'www-data',
APACHE_GROUP: 'www-data',
LANDO_NEEDS_EXEC: 'DOEEET',
},
ports: ['80'],
environment: options.environment,
user: 'root',
ports: options.ports,
volumes: [
`${options.confDest}/launch.sh:/launch.sh`,
`${options.confDest}/${options.defaultFiles.server}:${options.remoteFiles.server}`,
Expand Down
4 changes: 2 additions & 2 deletions config/default-ssl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Let apache know we're behind a SSL reverse proxy
SetEnvIf X-Forwarded-Proto https HTTPS=on

<VirtualHost _default_:80>
<VirtualHost *:80>
DocumentRoot "${LANDO_WEBROOT}"
<Directory "${LANDO_WEBROOT}">
Options Indexes FollowSymLinks
Expand All @@ -22,7 +22,7 @@ SetEnvIf X-Forwarded-Proto https HTTPS=on
LoadModule ssl_module modules/mod_ssl.so
</IfModule>

<VirtualHost _default_:443>
<VirtualHost *:443>
DocumentRoot "${LANDO_WEBROOT}"
SSLEngine on
SSLCertificateFile "/certs/cert.crt"
Expand Down
2 changes: 1 addition & 1 deletion config/httpd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,6 @@ PidFile "/opt/bitnami/apache/tmp/httpd.pid"
TraceEnable Off
Include /opt/bitnami/apache/conf/deflate.conf
IncludeOptional /opt/bitnami/apache/conf/vhosts/*.conf
Include /opt/bitnami/apache/conf/bitnami/bitnami.conf

<IfModule mod_headers.c>
RequestHeader unset Proxy
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ You can easily add it to your Lando app by adding an entry to the [services](htt
```yaml
services:
myservice:
type: apache
type: apache:2.4
```
## Supported versions
Expand All @@ -32,7 +32,7 @@ To use a patch version, you can do something as shown below:
```yaml
services:
myservice:
type: apache:2.4.33
type: apache:2.4.62
```
But make sure you use one of the available [patch tags](https://hub.docker.com/r/bitnami/apache/tags) for the underlying image we are using.
Expand Down
Empty file removed examples/.gitkeep
Empty file.
4 changes: 2 additions & 2 deletions examples/2.4/.lando.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: lando-apache
proxy:
override:
defaults:
- landoapache.lndo.site
services:
defaults:
Expand All @@ -11,4 +11,4 @@ services:
# This is important because it lets lando know to test against the plugin in this repo
# DO NOT REMOVE THIS!
plugins:
"@lando/apache": ./../../
"@lando/apache": ../..
4 changes: 2 additions & 2 deletions examples/custom/.lando.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: lando-apache-custom
proxy:
override:
custom:
- landoapachecustom.lndo.site
services:
custom:
Expand All @@ -23,4 +23,4 @@ services:
# This is important because it lets lando know to test against the plugin in this repo
# DO NOT REMOVE THIS!
plugins:
"@lando/apache": ./../../
"@lando/apache": ../..

0 comments on commit 9e40f0c

Please sign in to comment.