Generic MSW will perform different basic tasks within the realm of ship reporting and information exchange. The MSW is not customized to any particular country, application or process, but will provide basic services to support clearence processes within any country that seeks to meet the international obligations.
These instructions will get you a copy of the project (client and server) up and running on your local machine for development and testing purposes. The project is compatible with Windows and Ubuntu. Please follow the specific guide for your operating system.
Before you start, ensure Docker is installed on your machine:
- For Ubuntu: Docker Engine on Ubuntu
- For Windows: Docker Desktop
Clone the MSW repository to your local machine:
git clone https://github.com/Kystverket/IMO-Maritime-Single-Window.git
- Docker version 26.1.4
- WSL version: 2.2.4.0 (Windows only)
- Verify Docker Installation: Confirm that Docker is installed correctly using the CLI:
docker -v
or
sudo docker -v
- Navigate to Project Directory: Change directory to where the
docker-compose.yaml
is located (under /IMO-Maritime-Single-Window):
IMO-Maritime-Single-Window/
├── BuildFrontend.bat
├── CONTRIBUTING.md
├── IMOMaritimeSingleWindow
│ ├── Client
│ ├── Database
│ ├── README.md
│ ├── Server
│ ├── docker-compose.yaml
│ └── package-lock.json
cd IMOMaritimeSingleWindow
- Verify Docker and WSL installation: Use the CLI to ensure both Docker and WSL are installed:
wsl -v # Check WSL version
docker -v # Check Docker version
- Navigate to Project Directory: Go to the folder containing
docker-compose.yaml
:
cd IMOMaritimeSingleWindow
- For Ubuntu:
docker compose up
or
sudo docker compose up
- For Windows
docker compose up
This command builds and starts all necessary services as defined in docker-compose.yaml
, including the client interface, server application, and PostgreSQL database. This process may take some time during the initial setup, as it executes the SQL script to populate the database.
To monitor and debug, open another CLI window and list all running containers:
docker ps
This displays each container's ID, which you need to view specific logs.
To check logs for individual services, use:
docker logs <CONTAINER ID>
For instance, to monitor the frontend service, look for logs from imomaritimesinglewindow-frontend.devcontainer-1
. The setup is complete when you see "Compiled successfully" in the logs.
Navigate to the following URL in a web browser to access the MSW interface:
http://localhost:4200
When you need to remove all containers, use:
docker compose down
To remove all containers, networks, and volumes:
docker compose down --volumes