-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
46 lines (41 loc) · 1.01 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# docker-compose -f .\docker-compose.yml build # Construye la imagen Docker
# docker-compose -f .\docker-compose.yml up -d # Levanta los servicios
# docker-compose -f .\docker-compose.yml down # Eliminar contenedores detenidos
# docker-compose logs -f # Verificación
version: '3.3'
networks:
devops_network:
driver: bridge
services:
app:
container_name: helloword
build:
context: .
dockerfile: Dockerfile
restart: always
# privileged: true
# user: root
ports:
- 8080:8080
# volumes:
# - redhat_data:/usr/lib
depends_on:
- postgres
networks:
- devops_network
postgres:
image: postgres:latest
container_name: postgres
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- 5432:5432
networks:
- devops_network
volumes:
# redhat_data:
postgres_data: