GithubHelp home page GithubHelp logo

scriptodude / lunch-and-learn-docker Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 1.38 MB

Lunch and learn de 'comment dockerizer une application full-stack localement'

Dockerfile 3.85% Rust 12.85% Shell 4.85% TSQL 1.51% JavaScript 11.22% TypeScript 61.14% HTML 3.74% CSS 0.83%

lunch-and-learn-docker's Introduction

Lunch and learn - Techso

Exécuter une app full-stack sur docker, localement

La version de docker est 19.03.12, build 48a66213fe La version de docker-compose est

docker-compose version 1.25.4, build unknown
docker-py version: 4.0.2
CPython version: 3.7.7
OpenSSL version: OpenSSL 1.1.1g FIPS  21 Apr 2020

Étapes pour exécuter

  1. Déployer la base de données sh ./database/construct.sh

  2. Construire le backend

    cd backend-rust && docker build . -t lunch_and_learn:backend

  3. Exécuter le backend

    docker run --rm -d -p '127.0.0.1:8000':8000 -e SQL_HOST=mysql_techso -e SQL_PORT=3306 --network fullstack --name backend lunch_and_learn:backend

    Explications:

    docker run \
        --rm \                      # Enlever le conteneur automatiquement 
        -d \                        # Exécuter en arrière-plan 
        -p '127.0.0.1:8000':8000 \  # Forward le port 8000 du docker vers 127.0.0.1:8000 de la machine hôte
        -e SQL_HOST=mysql_techso \  # Variable d'environnement SQL_HOST, utilisation du docker-network dns
        -e SQL_PORT=3306         \  # Variable d'envrionnement
        --network fullstack      \  # Ajoute le conteneur au network fullstack
        --name backend           \  # Nom amical pour les humains
        lunch_and_learn:backend    # Nom de l'image
  4. Exécuter le frontend

    cd frontend && yarn install && yarn start

  5. Visitez localhost:4200

  6. ???

  7. Profit

Docker compose

La version de docker-compose utilisée est 1.25

  1. docker-compose up
  2. Lancer le frontend cd frontend && yarn install && yarn start
  3. Visitez localhost:4200

lunch-and-learn-docker's People

Watchers

James Cloos avatar Jonathan Lavigne 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.