-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
57 lines (54 loc) · 1.26 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
47
48
49
50
51
52
53
54
55
56
57
version: "3.1"
services:
server:
build:
context: .
dockerfile: Dockerfile
target: server-builder
networks:
- node_network
depends_on:
- mongo
environment:
URI: "mongodb://root:example@mongo:27017"
PORT: 4000
ports:
- 4000:4000
tty: true
# volumes:
# - .:/app
# command: /usr/local/wait-for-it.sh mongosh:27017 -- npm run dev
client:
build:
context: .
dockerfile: Dockerfile
target: client-builder
# entrypoint: /bin/sh //Not interested to run manually within container
networks:
- node_network
ports:
- 5173:5173
tty: true
environment:
VITE_DOCKER: "Hola Docker"
# volumes:
# - type: bind
# source: ./
# target: /srv/app
mongo:
image: mongo
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
volumes:
- "./Server/data/mongodb:/data/db"
ports:
- 27017:27017
networks:
- node_network
networks:
node_network:
# nicolaka/netshoot: Let us inspect another container in the same network and get pretty sensitive data from it (ip, etc)
# docker run -it --network chat-server_node_network nicolaka/netshoot
# dig mongo