Development on AnzuSystems Notification-Server by Petit Press a.s. (www.sme.sk)
Simple guide on how to develop on the project, run tests, etc.
Start Core-DAM docker containers if not started yet - pubsub and nginx-proxy services are used from that project.
See the official Core-DAM Development documentation on how to start Core-DAM containers.
git clone https://github.com/anzusystems/notification-server.git
Start project docker containers:
bin/docker-compose up --build -d
Arguments:
--build
- Build all images to run fresh docker containers-d
- Run docker containers in the detached mode as background processes
Add this entry to your hosts:
127.0.0.1 notification-server.anzusystems.local
-
Linux/Mac location:
/etc/hosts
-
Windows location
C:\Windows\System32\drivers\etc\hosts
By default the docker-compose
command will autostart node server yarn dev
with logs in var/log/node-server.log
file.
Hint: You can disable node server autostart with variable DOCKER_NODE_AUTOSTART=false
in .env.docker.local
. You have to restart the docker-compose to apply the change.
You must stop the running node server with the command:
bin/run stop
Run watch
node server (See below in the command description for more command line options):
bin/run watch
Scripts available in the project.
Script used to run bash in the application docker container.
bin/bash
Execute bin/bash -h
for all bash containers and options.
Script used to run build in the application docker container.
bin/build
Wrapper script used to run docker-compose
:
bin/docker-compose
Options:
- see the official docker-compose docu for all options
Script will:
- setup correct permissions for the user if needed (sync UID and GID in docker container with host user, etc.)
- run
docker-compose
command
Script used to run node server dev
, watch
, prod
and more:
bin/run watch
Execute bin/run -h
for all command arguments.
Script used to run the security check inside the docker container:
bin/security
Script used to run tests inside the docker container:
bin/test