- Copy ".env.example" file in project root and create a new file called ".env". Populate the new file with environment variables of your choice.
- Repeat step 1 for the packages/backend and packages/frontend directories.
- Run
docker-compose up -d
in the root directory to build and start docker containers - (Optional) Run
docker-compose logs -f
if you want to see the containers continuos output - (Optional) Install dependencies with
npm install
in root directory, packages/frontend and packages/backend directories. This is mostly to get code quality and development tools working in your editor and initialise git hooks etc.
The app should run the start scripts for all packages automatically when starting the containers. Changes in the source code should be reflected automatically, if it stops doing that it usually means you need to restart your docker daemon.
The backend has seeders that you can choose to use for populating the database with some sample data.
To run the seeders you need to use the sequelize cli from inside the backend container. You can do that by running the following command from the project root:
docker exec 4dx_web_1 npx sequelize-cli db:seed:all
You can run any sequelize cli command the same way, so for example if you want to undo the seeding you can do (beware: this might delete other records you might have added manually as well):
docker exec 4dx_web_1 npx sequelize-cli db:seed:undo:all
Your docker container name might be something else than 4dx_web_1
. You can check your container names by running docker-compose ps
.