[PYTHON] code-server Local environment (4) Let's prepare an MVC environment including DB (1)

This is the 4th day article of Advent Calender on the 2019 code-server. This time as well, I will explain what is code-server?

(1) What is code-server? (2) Create your own code-server environment with Docker (3) Try using VSCode Plugin (4) Let's prepare an MVC environment including DB etc. (1) (5) Let's prepare an MVC environment including DB etc. (2) (6) Let's prepare an MVC environment including DB etc. (3) (7) Let's prepare an MVC environment including DB etc. (4) (8) Let's prepare an MVC environment including DB etc. (5) (9) Let's prepare an MVC environment including DB etc. (6) (10) Bonus

(NEXT->) Online environment version 1st day Improve the work environment

(..) To build locally including environment such as DB (..) How to put it online? (..) How to work with the latest trendy environment such as K8S? (..) I want to modify Code-Server to make it better

From this time, we will create a development environment for a web framework that operates locally 2-3 times.

Let's build a development environment using db, phpmyadmin and flask using docker-compose !!

What is this time?

Eliminate the cost of building a team development environment

As explained in Coder, the developer of code-server, https://coder.com/docs/introduction

Eliminating the cost of building a team development environment can be achieved with code-server. By building the environment once and solidifying the image, you will never have to build the development environment again.

Let's use it with Docker-Compose

Let's call the Python environment created last time by calling it from docker-compose.

docker-compose.yml


version: '3'
services: 
  app:
    build: ./app
    ports: 
      - 8443:8443
      - 8080:8080
    volumes:
      - ./app:/works/app
    command: /works/code-server --allow-http --auth none --port 8443 /works/app

It is arranged as follows.

$ find . -type f
.
./app
./app/Dockerfile
./app/main.py
./docker-compose.yml

docker-compose.yml is almost the same as the last call command !!

https://docs.docker.com/compose/compose-file/

It would be good to refer to such as.

Let's run

$ docker-compose build
$ docker-compose up -d

By doing so, you can start code-server.

And When you access http://127.0.0.1:8443/ with a browser, Screen Shot 2019-12-03 at 5.39.02.png

You can open VS Code

next time

Let's create a python web framework environment called flask

PS

Source

https://github.com/kyorohiro/advent-2019-code-server

Recommended Posts

code-server Local environment (9) Let's prepare an MVC environment including DB (6)
code-server Local environment (4) Let's prepare an MVC environment including DB (1)
code-server Local environment (5) Let's prepare an MVC environment including DB (2)
code-server online environment (6) Let's automate
code-server Local environment (3) Try using VSCode Plugin
Introduction to Python Let's prepare the development environment