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

fix/Https, Readme, Dev mode, Add override, Playwright fix #81

Merged
merged 8 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
3 changes: 3 additions & 0 deletions .codepipeline/local-dev/configs/nginx/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ server {
# listen on port
listen 3000 default_server;
listen [::]:3000 default_server;
listen 3443 ssl;
ssl_certificate /etc/nginx/nginx.crt;
ssl_certificate_key /etc/nginx/nginx.key;

root /var/www/html;

Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,7 @@ HEALTHCHECK --interval=10s --timeout=10s --start-period=5s --retries=15 \
CMD curl -s -o /dev/null -w "%{http_code}" http://localhost:3000 | grep -q -E "^[1-3][0-9]{2}$" && \
test -f ~/.cmfive-installed

RUN cd /etc/nginx && \
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout nginx.key -out nginx.crt -subj "/C=AU/ST=NSW/L=Bega/O=2pi/CN=localhost"

CMD ["/bootstrap/start.sh"]
34 changes: 22 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
# cmfive-boilerplate ![Build Status](https://travis-ci.org/adam-buckley/cmfive-boilerplate.svg?branch=master)
A boilerplate project layout for Cmfive

### Local hosting/deployment with docker-compose
Requirements:
- docker
- mkcert
## Deploying a development environment with docker-compose

Install the root CA on your machine so that the SSL certificate is trusted (you can skip this and opt to go through the warning pages that browsers will give you):
run from the boilerplate directory:
### Requirements

```bash
cd .build/certs
mkcert -install
```
- docker
- docker-compose

### Setting up

Once done you can start the containers. For development we recommend the Docker plugin by Microsoft for VS Code. Simply right click on the **docker-compose.yml** file and select **Compose Up**.
For development we recommend the Docker plugin by Microsoft for VS Code. Simply right click on the **docker-compose.yml** file and select **Compose Up**.

Alternatively to run it on the CLI:

Expand All @@ -32,8 +28,22 @@ docker ps

NOTE: The compiler will always start after cmfive is running.

## Logging in

From there, navigate to: [http://localhost:3000](http://localhost:3000) and log in with your admin account. For development it is:

- Username: admin
- Password: admin


## HTTPS

If you need to test on HTTPS it's available on [https://localhost:3443](https://localhost:3443). It's configured with a self-signed certificate, ignore the browser warning.

## Changing the cmfive-core branch

When you work on the system directory you may need to change the branch. To do this you can run this command:

```sh
# Replace develop with your desired branch
docker exec -it cmfive ./cmfive.php install core develop
mattbell87 marked this conversation as resolved.
Show resolved Hide resolved
```
3 changes: 3 additions & 0 deletions config.php.example
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,6 @@ Config::set('system.rest_api_key', "abcdefghijklmnopqrstuvwxyz1234567890");
Config::set('system.rest_include', [
// "Contact"
]);

// Development mode
Config::set('system.environment', 'development');
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ services:
- ./test/Codeception/tests/_output:/var/www/html/test/Codeception/tests/_output
ports:
- "3000:3000"
- "3443:3443"
networks:
- default
restart: unless-stopped
Expand Down