2022-12-13 23:58:19 +01:00
2023-01-18 12:12:29 +01:00
2022-12-13 23:58:19 +01:00
2023-01-04 18:33:54 +01:00
2023-01-04 19:12:37 +01:00
2023-01-04 18:33:54 +01:00
2023-01-17 19:44:15 +01:00
2023-01-17 22:31:58 +01:00
2022-12-13 23:58:19 +01:00

docker-node-api

Overview

This project is an api that allows you to manage your docker containers and images from your smartphone. The api was made in Node-js with the framwork express. It uses a PostresSQL database. The library used to manage docker is dockerode. You can find the android application at the following address. https://github.com/Crakleurs/docker-node-api/releases/tag/v1.02

gif

Installation

To install the api on the server, you just have to clone the project.

git clone https://github.com/Crakleurs/docker-node-api.git

You can then launch the whole architecture using docker. Docker will create the images and then launch the database and the api.

The order is as follows

docker-compose up -d

Apply modifications

You can modify the api, if you wan't to apply the modifications to the production, you need to use the following command.

docker-compose up -d --build

Nginx

If you use nginx you can use the following configuration file. You need to change the server_name and also the certificates. The api is just working with https, you can use the cert bot software to generate SSL certificates.

server {
        listen 80;
        server_name api-docker.etienne-faviere.tech;
        return 301 https://$host$request_uri;
}

server {
        listen 443 ssl http2;
        server_name api-docker.etienne-faviere.tech;

        ssl_certificate /etc/letsencrypt/live/api-docker.etienne-faviere.tech/fullchain.pem; # managed by Certbot
        ssl_certificate_key /etc/letsencrypt/live/api-docker.etienne-faviere.tech/privkey.pem; # managed by Certbot
        include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
        ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

        location / {
                proxy_pass http://localhost:8080;
        }
}
S
Description
No description provided
Readme
275 KiB
Languages
TypeScript 99.1%
Dockerfile 0.9%