forked from mozilla/pontoon
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve
make shell
, add instructions for SSH in Docker (mozilla#3415)
Make `make shell` connect to the actual server container, add `make shell-root`. Currently, `make shell` spins up a brand new container, which is not particularly useful.
- Loading branch information
Showing
2 changed files
with
56 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,38 @@ If you're not familiar with `Docker <https://docs.docker.com/>`_ and | |
`docker-compose <https://docs.docker.com/compose/overview/>`_, it's worth | ||
reading up on. | ||
|
||
Writing to external repositories | ||
-------------------------------- | ||
|
||
:doc:`Environment variables <../admin/deployment>` like ``SSH_KEY`` and ``SSH_CONFIG`` | ||
have no effect in a Docker setup. | ||
|
||
The `~/.ssh` folder of the host system is mapped automatically to the home | ||
folder within the container. In order to connect to a remote repository via SSH, | ||
you need to create a passwordless SSH key, and configure `~/.ssh/config` | ||
accordingly. | ||
|
||
Here's an example for GitHub, assuming the private key file is called | ||
`id_ed25519` (see also `GitHub's instructions | ||
<https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account>`_ | ||
to generate a new key): | ||
|
||
.. code-block:: | ||
Host github.com | ||
User YOUR_USERNAME | ||
IdentityFile ~/.ssh/id_ed25519 | ||
StrictHostKeyChecking no | ||
The project's repository will use the format | ||
``[email protected]:{ORGANIZATION}/{REPOSITORY}.git`` for the ``URL`` field. | ||
|
||
An alternative approach for GitHub is to use a `Personal Access Token (PAT) | ||
<https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens>`_, | ||
and set up the project's ``URL`` as `https://` instead of `git@`. In this case, | ||
the ``URL`` will need to include both the PAT and username, e.g. | ||
``https://{USER}:{TOKEN}@github.com/{REPOSITORY}``. | ||
|
||
|
||
JavaScript setup | ||
================ | ||
|
@@ -75,6 +107,8 @@ you can start an interactive shell inside a Pontoon container: | |
$ make shell | ||
`make shell-root` is also available to log in as `root`, instead of the | ||
default `pontoon` user. | ||
|
||
Browser Support | ||
=============== | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters