- Clone the repository.
git clone https://bitbucket.org/programic/docker-devtools cd docker-devtools
- Create external networks
docker network create web docker network create localstack
- Start dev-tools:
docker compose up -d
- Add the bin folder to your $PATH
# Bash as shell nano ~/.bashrc # ZSH as shell nano ~/.zshrc # Add this to the bottom of this file, and change the path to your docker-devtools folder export PATH="${PATH}:/Users/remco/code/docker-devtools/bin"
- Add it to your MacOS Keychain:
for Ubuntu:
sudo security add-trusted-cert -d -r trustRoot -k "/Library/Keychains/System.keychain" ./services/traefik/certs/output/programic-ca.crt
sudo cp ./services/traefik/certs/output/programic-ca.crt /usr/local/share/ca-certificates sudo update-ca-certificates
- Browser support:
- Chrome: out of the box, except for Ubuntu. Chrome does not support system installed certificates anymore,
which is why .crt files in the Ubuntu filesystem will be recognized, but not accepted. After installing the files,
go to Chrome,
Settings
>Privacy and Security
>Security
>Manage Certificates
. Add the output .crt files to to the tabServers
. They will then appear in theOthers
section. - Safari: out of the box
- Firefox:
about:config
>security.enterprise_roots.enabled
:true
- Chrome: out of the box, except for Ubuntu. Chrome does not support system installed certificates anymore,
which is why .crt files in the Ubuntu filesystem will be recognized, but not accepted. After installing the files,
go to Chrome,
- Other support:
- curl: out of the box
- Postman:
Postman
>Preference
>Certificates
- CA Certificates:
ON
- PEM file:
./services/traefik/certs/output/programic-CA.pem
- CA Certificates:
- Installing the
dialog
package: Ubuntusudo apt install dialog
, MacOSbrew install dialog
- Open the NrdSSH client by running
s
in your terminal
- Traefik: http://localhost:8080
- Portainer: http://localhost:9000
- First build the Docker image to generate the Programic developer certificates. Navigate to
cd services/traefik/certs/docker
and runbash build.sh
- Navigate to its parent directory
cd ..
and run the Docker image you just build:bash generate.sh
- Done. The certificates are saved in the
output
directory. Commit your changes.
- Create a S3 bucket for your project:
docker compose exec localstack awslocal s3api create-bucket --bucket [your-bucket-name]
- Test the connection and check if the bucket has been created:
docker run --rm -it --network localstack \ -e AWS_ENDPOINT_URL=http://localstack:4566 \ -e AWS_ACCESS_KEY_ID=test \ -e AWS_SECRET_ACCESS_KEY=test \ amazon/aws-cli \ s3 ls
- Edit the local
docker-compose.yml
file of your project:services: php: networks: localstack: # Add the container to the LocalStack network worker: networks: localstack: # Add the container to the LocalStack network scheduler: networks: localstack: # Add the container to the LocalStack network networks: localstack: # Define the LocalStack network external: true
- Configure Laravel filesystem to connect to LocalStack S3:
AWS_ENDPOINT=http://localstack:4566 AWS_URL=https://localstack.pro.test AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test AWS_DEFAULT_REGION=eu-central-1 AWS_USE_PATH_STYLE_ENDPOINT=true AWS_BUCKET=[your-bucket-name]
cd bin/do-spaces-config
docker run --rm -it \
-e AWS_ENDPOINT_URL=https://ams3.digitaloceanspaces.com \
-e AWS_ACCESS_KEY_ID=[your_access_key_id] \
-e AWS_SECRET_ACCESS_KEY=[your_secret_access_key] \
-e S3_BUCKET=[your_s3_bucket] \
-v $(pwd):/aws \
--entrypoint /bin/bash \
amazon/aws-cli \
enable-versioning.sh