Coder Social home page Coder Social logo

test.cloudseed's Introduction

Overview

(This is a test clone from the original CloudSeed project by Hamilton Greene)

CloudSeed was built to provide a simple, solid F# project base.

CloudSeed is split into three primary services:

  • App - Your app logic. Everything from business logic to data access to UI creation (if you stick with Server-side Rendering)
    • Built with F# and Giraffe (ASP.NET)
    • Template views are created with Giraffe.ViewEngine but it's easy to switch to other rendering paradigms should you wish.
  • App.Tests - Tests for App
  • DB - A local, dockerized DB you can spin up to simulate real-world deployment + integration use cases.
    • Postgres

Getting Started

  1. Clone the repo
  2. Change the upstream
    • You won't be able to push to CloudSeed, but you may still want the upstream handy in case you want to grab some updates
    • Rename cloudseed remote: git remote rename origin cloudseed
    • Add your repo as origin: git remote add origin URLHERE
    • Note: CloudSeed is not built to be backwards compatible, so it's not encouraged to blindly do an update and expect things to work exactly - though we'll do as little breaking changes as we can
  3. If you're planning to build many projects with cloudseed, you will need to modify the docker-compose so that the container names don't collide on your machine
    • Repeat for docker-compose.test

Development

Building and running locally

From root: docker-compose down --remove-orphans && docker-compose build && docker-compose up

If all goes smoothly, you should be able to access each service at:

  • App - localhost:5001
    • Verify at: localhost:5001/sentinels
  • DB - localhost:5002

Additional commands

  • RM all old artifacts: sudo docker-compose down
  • Full rebuild - sudo docker-compose build
  • Run: sudo docker-compose up

Testing

Run both from root:

  • Setup DB (this must stay running): docker-compose -f docker-compose.test.yml down --remove-orphans && docker-compose -f docker-compose.test.yml up cloudseed_db_test
  • Run Tests (run this in a new terminal): docker-compose -f docker-compose.test.yml build cloudseed_app_tests && docker-compose -f docker-compose.test.yml up cloudseed_app_tests

Data

Data Migrations

By default, CloudSeed uses DBUp for migrations.

All database model upgrades happen via DBUp. DBUp will upgrade the database at app startup, running scripts in alphabetical order found in ./App/Source/Infrastructures/DatabaseUpgradeScripts.

This is the single source of truth for upgrades. It can run any sql compatible with Postgres by default - though you can always change to a different sql engine if you prefer.

Data ORM

CloudSeed is pre-configured with Entity Framework.

test.cloudseed's People

Contributors

sirhamy avatar iennacca 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.