Giter Club home page Giter Club logo

application-skeleton's Introduction

SumoCoders Application Skeleton

Use the following commands to create a new project:

composer create-project sumocoders/application-skeleton my_project
git init
git add .
git commit -n -m "Initial commit"

Start you project by running:

symfony server:start
npm run-script watch

Configuration

Deployment

Open deploy.php and check the configuration, replace the example values (prefixed with $) with correct values.

Try to deploy to staging by running:

symfony php vendor/bin/dep deploy staging

Log in thru ssh on the dev-server and alter the .env.local-file to use the correct credentials.

Continuous deployment to staging

Each time something is merged into the staging branch it can be deployed automatically. To do so, follow the steps below:

  1. Open the project in Gitlab.
  2. Open Settings → Repository → Deploy Keys.
  3. Click the tab "Privately accessible deploy keys" and enable the key called "Sumo deploy user".
  4. Open Settings → CI / CD → Variables.
  5. Add a variable called SSH_PRIVATE_KEY, the value can be found in 1Password under "Sumo Deploy User private key". You can check the "Protect variable" flag.
  6. Add a variable called SSH_KNOWN_HOSTS, the value should be the output of ssh-keyscan -H dev02.sumocoders.eu.
  7. Open .gitlab-ci.yaml, scroll to Deploy - to staging.
  8. Alter the url under environment → url.

Usage

Using Encore

Building assets:

# compile assets once
npm run-script dev

# or, recomile assets automatically when files change
npm run-script watch

# on deploy, create a production build
npm run-script build

For more information about Encore, see the official documentation.

Working on the Skeleton

Testing create-project locally

There is a test-script scripts/test.sh which you can use:

COMPOSER_MEMORY_LIMIT=-1 ./scripts/test.sh BRANCH-TO_TEST TARGETDIR

This will create a new project that uses the commited code in the selected branch. The new project will be located in the TARGETDIR

Kudos to beporter.

application-skeleton's People

Contributors

bjorvack avatar stijnvrolijk avatar tijsverkoyen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.