

In the src folder, create a new folder called. You can edit the current repository according to your needs! Let’s step through an example.
#POSTGRES APP START INSTALL#
Since we are using Typescript, we can optionally install sequelize types for Typescript: npm i -save -dev /sequelize The ORM is helpful because it’ll help us automatically create the table and make inserts, updates and deletes without writing SQL commands. We could use another ORM package or even not use an ORM at all. ( sequelize), which is an Object Relational Mapping (ORM) tool.( pg), which is the NPM package to connect Postgres.We need some more dependencies for this demo: If you are using Visual Studio Code, you can type at the prompt: code. Get into the directory: cd aws -docker -templates -express Now, let's clone the public Tinystacks repository: git clone https: ///tinystacks/aws-docker-templates-express.git Don’t worry, you don't have to memorize them all. These are all the basic commands available for docker compose. In this example, we will start from the TinyStacks Express repository and add what we need to make our application communicate with a database - in this case, Postgres.įirst of all, to check if Docker is up and running and see some available commands, open a command prompt and type: docker compose -help


Do I have to have many services to use Docker Compose? No, actually - it can also be used with a single service. So Docker Compose is used for managing multiple containers. They both work and, for this tutorial, it makes no difference which one you use! It’s written in the Go programming language and is perfectly compatible with the previous Python version, called docker-compose (with a dash). In this article we will use the latest version of the docker compose CLI - docker compose (without the dash). In this article, we will be using Docker Compose for the first time.ĭocker Compose is a very powerful tool that’s used to manage multiple containers, called services, with a single file.Ī key concept to understand is that, when we say Docker Compose, we must distinguish between the docker-compose.yml file (which will look like the picture below) and the docker compose CLI, the set of commands we can type directly at the command prompt. In our most recent articles on Docker, we looked at standing up a basic CRUD app with Docker and using storage in Docker containers.
