Code Monkey home page Code Monkey logo

demo_1's Introduction

demo_1

create network

docker network create -d bridge demo_1

creating docker containers

nginx

docker run -d --name nginx_demo_1 --network demo_1 -it -p 8080:80 nginx

configure

events {}

http {

    server {

        listen 80;

        location / {

            proxy_pass http://demo_1_api;

        }

    }

}

mysql

docker run --name demo_1_mysql --network demo_1 -e MYSQL_ROOT_PASSWORD=*password* -d mysql

phpmyadmin

for simple DB manegment you can run phpmyadmin:

docker run --name phpmyadmin -d -e PMA_HOST=demo_1_mysql --network demo_1 -p 8080:80 phpmyadmin

creating DB

  • create db named main
  • create 2 tables:
    user (id (auto increment), date_insert (CURRENT_TIMESTAMP), date_update (CURRENT_TIMESTAMP), phone, password_hash),
    user_token (id (auto increment), date_insert (CURRENT_TIMESTAMP), date_update (CURRENT_TIMESTAMP), user_id, token, expires)

main container

you need to create in root folder file named secrets.txt and put password, that you entered in last step

chmod +x build.sh
./build.sh

done

now, nginx running on localhost:8080. If not, try restarting nginx

demo_1's People

Contributors

maxtaran2010 avatar

Watchers

 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.