Giter Site home page Giter Site logo

github2017luo / geolocationapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dominikrzeplinski/geolocationapi

0.0 0.0 0.0 96 KB

This is simple REST WEB API that allows to check and store geolocation data based on IP or URL address.

License: GNU General Public License v3.0

C# 99.46% ASP 0.15% Dockerfile 0.39%

geolocationapi's Introduction

GeolocationAPI

This is simple REST WEB API that allows to check and store geolocation data based on IP or URL address.

Setup

Its possible to use docker containers to run application.
To run web applicatio use windows container:
docker run --name app -d -p8000:8000 dominikrzeplinski/geolocation-api:geolocationApp

After successful start check his ip: docker exec app ipconfig

output will show on what ip is running application: IPv4 Address. . . . . . . . . . . :

To store results run linux container with MySql database.

docker run --name db -d -p3306:3306 dominikrzeplinski/geolocation-api:geolocationDatabase

ip address of MySql database is set statically in web.config if yours docker machine for linux containers got different ip than 192.168.99.1 do next 2 steps:
attach to windows app container by: docker exec -ti app powershell change ip: (Get-Content C:\inetpub\wwwroot\Web.config ).Replace('192.168.99.1','000.000.00.0') | Out-File -Encoding Ascii C:\inetpub\wwwroot\Web.config where '000.000.00.0' is yours linux machine ip address. type 'exit'.

#Tips If application still cant connect to database check yours firewall permisions.

geolocationapi's People

Contributors

dominik-rzeplinski avatar dominikrzeplinski avatar

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.