Skip to content

Simple service that runs our Gatsby site build script.

License

Notifications You must be signed in to change notification settings

oikeuttaelaimille/builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Builder daemon

This simple program is used to build our Gatsby website.

Install

  1. Install node app.

    npm install -g oikeuttaelaimille/builder
  2. Start app with systemd.

    cat > /etc/systemd/system/builder.service <<EOF
    [Unit]
    Description=Builder Service
    After=network.target
    [Service]
    Type=simple
    User=ubuntu
    Group=ubuntu
    WorkingDirectory=/tmp
    ExecStart=/usr/lib/node_modules/builder/src/index.js
    Environment=PORT=9999
    Environment=COMMAND=/home/ubuntu/scripts/build.sh
    Environment=COMMAND_WORKING_DIRECTORY=/tmp
    Environment=NODE_ENV=production
    [Install]
    WantedBy=default.target
    EOF
    
    systemctl start builder.service
    systemctl enable builder.service
  3. Add build command

    cat > /home/ubuntu/scripts/build.sh <<EOF
    
    # Your build script here.
    npx gatsby build
    
    EOF

About

Simple service that runs our Gatsby site build script.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •