forked from Laboratoria/SAP010-burger-queen-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
40 lines (40 loc) · 1.07 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
version: "3"
services:
db:
# TODO: configura tu imagen de base de datos, te recomendamos una de estas:
# https://hub.docker.com/_/mongo
# https://hub.docker.com/_/postgres
# https://hub.docker.com/_/mysql
networks:
- private
node:
image: node:12 # https://hub.docker.com/_/node/
user: node
working_dir: /home/node/app
environment:
NODE_ENV: production
PORT: 8080
DB_URL: <CONNECTION STRING>
JWT_SECRET: xxxxxxxx
ADMIN_EMAIL: admin@localhost
ADMIN_PASSWORD: changeme
volumes:
- ./:/home/node/app # montamos el codigo en el HOME del usuario _node_
expose:
- 8080 # nuestra app corre en el puerto 8080
ports:
# mapeamos el puerto 8080 de nuestro contenedor al puerto 80 de nuestra
# máquina
- 80:8080
# reinstalamos las dependencias y levantamos el servidor
command: bash -c 'rm -rf node_modules && npm install && npm start'
depends_on:
- db
networks:
- public
- private
networks:
public:
internal: false
private:
internal: true