Git Product home page Git Product logo

docker-node-api's Introduction

Publish Docker image

docker-node-api

Download

Get it on Google Play

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.

Before launching the application, you need to change de environment variable in the docker-compose.yml

      MASTER_HOST: "https://api-url"

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;
        }
}

docker-node-api's People

Contributors

crakleurs avatar dependabot[bot] avatar marcpartensky avatar

Stargazers

 avatar  avatar Arnaud Dartois avatar Valentin Colin avatar  avatar  avatar Antonio Robles  avatar  avatar  avatar Abhishek Nair avatar  avatar Josh avatar TheWanderingShinobi avatar  avatar  avatar DoTheEvo avatar

Watchers

Jerome avatar  avatar  avatar

Forkers

marcpartensky

docker-node-api's Issues

Docker setup

Docker-compose.yml saved and when running docker-compose up -d shows

docker-compose up -d
[+] Running 14/15
⠿ api Warning 4.2s
⠿ db Pulled 53.9s
⠿ 934ce60d1040 Pull complete 21.3s
⠿ 0e0e7ecfda3f Pull complete 25.3s
⠿ 681739d8d2f1 Pull complete 25.6s
⠿ da16eb3bc31f Pull complete 26.1s
⠿ 0c4757322f3a Pull complete 27.8s
⠿ 965f008b3ce8 Pull complete 28.1s
⠿ be8cefcbac41 Pull complete 28.3s
⠿ 0b2ede37a8ac Pull complete 28.6s
⠿ 1848f57d0cfb Pull complete 45.9s
⠿ 3f7dfa419122 Pull complete 46.3s
⠿ 3a63e0efe9f6 Pull complete 46.6s
⠿ fe9a79c3cfe2 Pull complete 46.9s
⠿ 9edf317e37cb Pull complete 47.4s
[+] Building 0.2s (2/2) FINISHED
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 2B 0.0s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s

failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /mnt/hdd/docker/tmp/buildkit-mount2428078965/Dockerfile: no such file or directory

Crash

When we leave boxes blanks and click on login it closes app. Happens only when there are no servers added

pull access denied for docker-api, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

After initial pull, i'm greeted with the following:

docker compose pull

[+] Running 15/15
 ✔ db 13 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                                                  11.0s
   ✔ 3ae0c06b4d3a Already exists                                                                                                                                                                         0.0s
   ✔ 4a34531fd37c Already exists                                                                                                                                                                         0.0s
   ✔ 529fb828a0d2 Already exists                                                                                                                                                                         0.0s
   ✔ f6d51e9f7486 Already exists                                                                                                                                                                         0.0s
   ✔ bfc215549fcc Already exists                                                                                                                                                                         0.0s
   ✔ 61984e227719 Already exists                                                                                                                                                                         0.0s
   ✔ 256f8d08a12a Already exists                                                                                                                                                                         0.0s
   ✔ 668617f978f9 Already exists                                                                                                                                                                         0.0s
   ✔ ad076e900451 Pull complete                                                                                                                                                                          8.5s
   ✔ 3afc17d44dc1 Pull complete                                                                                                                                                                          8.7s
   ✔ 67853dbbcaf9 Pull complete                                                                                                                                                                          8.8s
   ✔ 6f90a3ca5d64 Pull complete                                                                                                                                                                          8.9s
   ✔ e3ebe1761852 Pull complete                                                                                                                                                                          9.1s
 ! api Warning                                                                                                                                                                                           1.2s
WARNING: Some service image(s) must be built from source by running:
    docker compose build api
1 error occurred:
        * Error response from daemon: pull access denied for docker-api, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

Is this expected ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.