The repository could be used as a template to start new project. Convenient local development with Docker and Makefile commands that allow you easily to start/stop the parts of your project. Moreover, you could use the template to run the production deployments with one change in the docker-compose.yaml configuration file. You should change the port 8080 to 80 and your server will respond on income requests.
In any questions, feel free to text to me https://x.com/michaeldomansky
cp .env.local .env
make up
- Open http://localhost:8080
make down
- Prepare server:
- create a user
deployer
- create SSH key for the
deployer
user with the commandssh-keygen
- create a folder
/var/www/your-project-name/
and change the owner of itchown deployer:www-data your-project-folder
- create a user
- Prepare GitHub repository
- add the project name to the repository variable
PROJECT
(only letters and digits, no spaces, no special characters) - add the server hostname or IP address to the repository variable
HOST
- add the PRIVATE key (
cat /home/deployer/.ssh/id_ed25519
) to the repository secretSSH_PRIVATE_KEY
- add the project name to the repository variable
- Go to the repository actions and run the action 'Prod deploy'
- Open the project folder and copy the env file
cp .env.prod .env