Last active
December 3, 2024 18:13
-
-
Save craigafinch/292f98618f8eadc33e9633e6e3b54c05 to your computer and use it in GitHub Desktop.
A systemd service to manage a Google Cloud Storage bucket mounted with GCSFuse
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
# https://github.com/GoogleCloudPlatform/gcsfuse | |
[Unit] | |
Description=Google Cloud Storage FUSE mounter | |
After=local-fs.target network-online.target google.service sys-fs-fuse-connections.mount | |
Before=shutdown.target | |
[Service] | |
Type=forking | |
User=apache | |
ExecStart=/bin/gcsfuse --key-file=/key/file/path/my-gcs-key.json bucket-name /var/www/html/mysite.com/mount_point | |
ExecStop=/bin/fusermount -u /var/www/html/mysite.com/mount_point | |
Restart=always | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment