Skip to content

xmartlabs/express-base-main

Repository files navigation

Express Base Main

Setup

In order to define all enrironments variables needed dockerUpScriptTemplate.example.sh file should be modified with proper values.

Dependencies

  • Docker. Download and install it from Get Docker
  • VirtualBox (optional but recommended).

Repos

Clone next repositories in the same container folder:

Start with docker

  1. cd into express-base-api folder and run:
npm install
  1. cd into express-base-main folder and run:
docker-compose up -d --build
*If you need to define evironments variables just define them before docker-compose command.
Example: SECRET_KEY=RunsWithFries docker-compose up -d --build

Start within VirtualBox (recommended)

Optionally you can run docker machines withing an VirtualBox instance:

docker-machine create -d virtualbox <vm_name>
# Macke sure you run before last command! Each time you open a new terminal (either tab or window) you must eval again.
eval "$(docker-machine env <vm_name>)"
docker-compose up -d --build

Migrations

docker-compose run base-api node_modules/.bin/sequelize db:drop
docker-compose run base-api node_modules/.bin/sequelize db:create
$ docker-compose run base-api sequelize db:migrate        # Run pending migrations.
$ docker-compose run base-api sequelize db:migrate:undo   # Revert the last migration run.
$ docker-compose run base-api sequelize help              # Display this help text.
$ docker-compose run base-api sequelize migration:create  # Generates a new migration file.
$ docker-compose run base-api sequelize init              # Initializes the project.
$ docker-compose run base-api sequelize version           # Prints the version number.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published