roles/pleroma/templates/pleroma.service.j2
changeset 91 d1406d67c758
parent 90 08764af85bda
child 92 d4924111ce28
equal deleted inserted replaced
90:08764af85bda 91:d1406d67c758
     1 # {{ansible_managed}}
       
     2 
       
     3 [Unit]
       
     4 Description=Pleroma social network
       
     5 After=network.target postgresql.service
       
     6 
       
     7 [Service]
       
     8 User={{pleroma_user}}
       
     9 WorkingDirectory=/home/{{pleroma_user}}/pleroma
       
    10 
       
    11 Environment="HOME=/home/{{pleroma_user}}"
       
    12 Environment="MIX_ENV=prod"
       
    13 Environment="PLUG_TMPDIR=/tmp/{{pleroma_user}}"
       
    14 
       
    15 ExecStart=/usr/bin/mix phx.server
       
    16 ExecReload=/bin/kill $MAINPID
       
    17 KillMode=process
       
    18 Restart=on-failure
       
    19 
       
    20 ; Some security directives.
       
    21 ; Use private /tmp and /var/tmp folders inside a new file system namespace, which are discarded after the process stops.
       
    22 PrivateTmp=true
       
    23 ; The /home, /root, and /run/user folders can not be accessed by this service anymore. If your Pleroma user has its home folder in one of the restricted places, or use one of these folders as its working directory, you have to set this to false.
       
    24 ProtectHome=false
       
    25 ; Mount /usr, /boot, and /etc as read-only for processes invoked by this service.
       
    26 ProtectSystem=full
       
    27 ; Sets up a new /dev mount for the process and only adds API pseudo devices like /dev/null, /dev/zero or /dev/random but not physical devices. Disabled by default because it may not work on devices like the Raspberry Pi.
       
    28 PrivateDevices=false
       
    29 ; Ensures that the service process and all its children can never gain new privileges through execve().
       
    30 NoNewPrivileges=true
       
    31 ; Drops the sysadmin capability from the daemon.
       
    32 CapabilityBoundingSet=~CAP_SYS_ADMIN
       
    33 
       
    34 [Install]
       
    35 WantedBy=multi-user.target