Hi all,
I am working on an application developed in TypeScript and I use a Docker environment with Docker Compose to connect my containers:
version: '3.8'
services:
vcs:
container_name: vcs_api
restart: always
build: .
ports:
- ${PORT}:${PORT}
networks:
- vcs_network
depends_on:
- db
- redis
volumes:
- .:/usr/src/app
db:
container_name: vcs_postgre
image: postgres:14.5-alpine
ports:
- '5432:5432'
networks:
- vcs_network
volumes:
- db_volume:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
redis:
container_name: vcs_redis
image: redis:alpine
ports:
- '6379:6379'
networks:
- vcs_network
networks:
vcs_network: {}
volumes:
db_volume:
Now I need to deploy it in production but I do not know whether to use Docker for it or do it in a classic way. Insalling postgre, redis, node…etc.
At the moment my application will not escalate. What do you recommend? Do I use docker-compose or avoid using containers? I worry that Docker is not so fast as each service installed on the machine itself could be.
In the event that it is better to do it with Docker. How would the backups of the database? Is there any tool or simply need to copy the files of the PostgreSQL volume?
Much thanks for your time