How to deploy a docker app and a proxy service on Azure?

%3CLINGO-SUB%20id%3D%22lingo-sub-2307184%22%20slang%3D%22en-US%22%3EHow%20to%20deploy%20a%20docker%20app%20and%20a%20proxy%20service%20on%20Azure%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2307184%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%26nbsp%3BI%20am%20new%20to%20docker%20and%20azure.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20deploy%20a%20docker%20web%20app.%20I%20am%20using%20docker-compose%20to%20build%20an%20app%20and%20a%20proxy.%20Here%20is%20the%20docker-compose%20file.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-yaml%22%3E%3CCODE%3Eversion%3A%20'3.7'%0A%0Aservices%3A%20%0A%20%20%20%20app%3A%0A%20%20%20%20%20%20%20%20build%3A%20%0A%20%20%20%20%20%20%20%20%20%20%20%20context%3A%20.%0A%20%20%20%20%20%20%20%20volumes%3A%20%0A%20%20%20%20%20%20%20%20%20%20%20%20-%20static_data%3A%2Fvol%2Fweb%0A%20%20%20%20%20%20%20%20environment%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20-%20SECRET_KEY%3Dsamplesecretkey123%0A%20%20%20%20%20%20%20%20%20%20%20%20-%20ALLOWED_HOSTS%3D127.0.0.1%2Clocalhost%0A%20%20%20%20%0A%20%20%20%20proxy%3A%0A%20%20%20%20%20%20%20%20build%3A%20%0A%20%20%20%20%20%20%20%20%20%20%20%20context%3A%20.%2Fproxy%0A%20%20%20%20%20%20%20%20volumes%3A%20%0A%20%20%20%20%20%20%20%20%20%20%20%20-%20static_data%3A%2Fvol%2Fstatic%0A%20%20%20%20%20%20%20%20ports%3A%20%0A%20%20%20%20%20%20%20%20%20%20%20%20-%20%228080%3A8080%22%0A%20%20%20%20%20%20%20%20depends_on%3A%20%0A%20%20%20%20%20%20%20%20%20%20%20%20-%20app%0A%0Avolumes%3A%20%0A%20%20%20%20static_data%3A%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere%20is%20the%20folder%20structure%2C%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%20from%202021-04-29%2020-13-16.png%22%20style%3D%22width%3A%20293px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F276809iAD0885027B5A4905%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%20from%202021-04-29%2020-13-16.png%22%20alt%3D%22Screenshot%20from%202021-04-29%2020-13-16.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EFor%20context%2C%20I%20am%20using%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dnh1ynJGJuT8%26amp%3Bt%3D1897s%26amp%3Bab_channel%3DLondonAppDeveloper%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ethis%20tutorial%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDocker-compose%20works%20perfectly%20on%20my%20system%20and%20the%20images%20look%20like%20this%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%20from%202021-04-29%2020-18-56.png%22%20style%3D%22width%3A%20795px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F276813iFF47DED6781D4320%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%20from%202021-04-29%2020-18-56.png%22%20alt%3D%22Screenshot%20from%202021-04-29%2020-18-56.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EI%20am%20aware%20of%20web%20apps%20for%20container%2C%20but%20I%20can't%20seem%20to%20understand%20how%20to%20deploy%20my%20project%20on%20Azure.%20Any%20help%20would%20be%20appreciated.%3C%2FP%3E%3CP%3EPlease%20let%20me%20know%20if%20you%20need%20to%20see%20any%20other%20part%20of%20my%20code.%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2307184%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EWeb%20Apps%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

Hello, I am new to docker and azure.

 

I am trying to deploy a docker web app. I am using docker-compose to build an app and a proxy. Here is the docker-compose file.

 

 

version: '3.7'

services: 
    app:
        build: 
            context: .
        volumes: 
            - static_data:/vol/web
        environment:
            - SECRET_KEY=samplesecretkey123
            - ALLOWED_HOSTS=127.0.0.1,localhost
    
    proxy:
        build: 
            context: ./proxy
        volumes: 
            - static_data:/vol/static
        ports: 
            - "8080:8080"
        depends_on: 
            - app

volumes: 
    static_data:

 

Here is the folder structure,

Screenshot from 2021-04-29 20-13-16.png

For context, I am using this tutorial 

 

Docker-compose works perfectly on my system and the images look like this

Screenshot from 2021-04-29 20-18-56.png

I am aware of web apps for container, but I can't seem to understand how to deploy my project on Azure. Any help would be appreciated.

Please let me know if you need to see any other part of my code. 

Thanks in advance!

0 Replies