/
docker-compose.yml
31 lines (28 loc) · 1.09 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
version: "3.3"
services:
postgres:
# Use the Docker Image postgres. This will pull the newest release.
image: "postgres"
# Give the container the name my_postgres. You can changes to something else.
container_name: "restAdoptApi"
# Setup the username, password, and database name. You can changes these values.
environment:
- POSTGRES_USER=john
- POSTGRES_PASSWORD=password
- POSTGRES_DB=rest_dopt_api
# Maps port 54320 (localhost) to port 5432 on the container. You can change the ports to fix your needs.
ports:
- "54320:5432"
# Set a volume some that database is not lost after shutting down the container.
# I used the name postgres-data but you can changed it to something else.
volumes:
- ./postgres-data:/var/lib/postgresql/data
nodejs:
build:
context: .
dockerfile: Dockerfile
image: resume-app
container_name: resume-app
restart: unless-stopped
ports:
- "8080:3001"