A 20tab standard project cookiecutter template.
In the following instructions:
projects
is your actual projects directoryMy Project Name
is your chosen project name
Cookiecutter must be installed in order to create and initialize the project structure.
$ python3 -m pip install cookiecutter
Install the git
command-line, if the GitLab integration is needed.
-
🍏 macOS
$ brew install git
-
🐧 GNU/Linux
$ sudo apt install git
Install the python-gitlab
package, if the GitLab integration is needed.
$ python3 -m pip install python-gitlab
A GitLab user account is required by the setup procedure to create the repositories, and by Kubernetes to pull the images from the Docker registry.
Make sure you have a local SSH key and have it associated with your GitLab account in the "SSH Keys" section in the settings.
Put the GitLab Access Token of the chosen user in an environment variable (e.g. export it in the command line or add it to the bash config).
$ export GITLAB_PRIVATE_TOKEN={{gitlab_private_token}}
Note: the access token can be generated from the GitLab settings "Access Tokens" section. Make sure to give it full permission. Beware that GitLab only shows the token right after creation, and hides it thereafter.
Change directory and create a new project as in this example:
$ cd ~/projects/
$ cookiecutter https://github.com/20tab/20tab-standard-project
project_name: My Project Name
project_slug [myprojectname]:
domain_url [myprojectname.com]:
Select which_frontend:
1 - None
2 - React (TypeScript)
3 - React
Choose from 1, 2, 3 [1]:
Select use_gitlab:
1 - Yes
2 - No
Choose from 1, 2 [1]:
Select use_media:
1 - Yes
2 - No
Choose from 1, 2 [1]:
Generated '.env' file.
Generated '/requirements/common.txt' file.
Generated '/requirements/dev.txt' file.
Generated '/requirements/prod.txt' file.
Generated '/requirements/tests.txt' file.
Generated '/static' directory.
Choose the gitlab group path slug [myprojectname]:
Insert a comma separated list of usernames to set as group owners:
Insert a comma separated list of usernames to set as group mantainers:
To configure the Kubernetes cluster now, read the SETUP documentation.