docker container run \
--restart unless-stopped \
--name blackd-service \
-d \
-p 45484:45484 \
--entrypoint /usr/local/bin/blackd \
pyfound/black \
--bind-host 0.0.0.0 \
--bind-port 45484
Last active
November 18, 2023 18:40
-
-
Save xgenvn/bc4544a51bde2b0751011a8c8f3c15d2 to your computer and use it in GitHub Desktop.
BlackD Formatter as service
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
# /etc/systemd/system/blackd.service | |
# sudo systemctl start blackd | |
# sudo systemctl enable blackd | |
# sudo systemctl status blackd | |
[Unit] | |
Description=Black Formatter Service | |
[Service] | |
ExecStart=/home/brian/bin/miniconda3/bin/blackd --bind-host=127.0.0.1 | |
[Install] | |
WantedBy=multi-user.target |
it would run on 0.0.0.0 which is kinda not safe. you should add --bind-host=127.0.0.1
Thanks. I didn't know it'll bind to 0.0.0.0. Updated.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
it would run on 0.0.0.0 which is kinda not safe. you should add --bind-host=127.0.0.1