Skip to content

Latest commit

 

History

History
142 lines (91 loc) · 3.43 KB

README.md

File metadata and controls

142 lines (91 loc) · 3.43 KB

Maritime Single Window (MSW)

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.

Getting Started

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.

Contact

jarle.hauge@kystverket.no

Prerequisites

Before you start, ensure Docker is installed on your machine:

Clone Repository

Clone the MSW repository to your local machine:

git clone https://github.com/Kystverket/IMO-Maritime-Single-Window.git

Dependencies

  • Docker version 26.1.4
  • WSL version: 2.2.4.0 (Windows only)

Installation

Ubuntu

  1. Verify Docker Installation: Confirm that Docker is installed correctly using the CLI:
docker -v  

or

sudo docker -v
  1. Navigate to Project Directory: Change directory to where the docker-compose.yamlis 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

Windows

  1. 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
  1. Navigate to Project Directory: Go to the folder containing docker-compose.yaml:
cd IMOMaritimeSingleWindow

Build & Run the Docker Containers

  • 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.

Monitoring Client and Server Logs

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.

Access the Application

Navigate to the following URL in a web browser to access the MSW interface:

http://localhost:4200

Stopping and Removing Containers

When you need to remove all containers, use:

docker compose down

To remove all containers, networks, and volumes:

docker compose down --volumes