-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·54 lines (51 loc) · 1.22 KB
/
docker-compose.yml
File metadata and controls
executable file
·54 lines (51 loc) · 1.22 KB
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
version: '3'
services:
db:
image: mongo:4.2.0-rc1-bionic
container_name: nuxt_crud_mongo
ports:
- '27017:27017'
volumes:
- ./data:/data/db
networks:
- net
server:
build: ./server
image: nuxt-crud-server #setup image name
container_name: nuxt_crud_server
#restart: always
ports:
- '3000:3000'
environment:
- HOST=0.0.0.0
- PORT=3000
#depends_on:
#- 'db'
networks:
- net
client:
build: ./client
image: nuxt-crud-client
container_name: nuxt_crud_client
#restart: always
ports:
- '8000:8000'
environment:
- HOST=0.0.0.0
- PORT=8000
- API_URL=http://nuxt_crud_server:3000/ # See to move to .env file ¿?
#depends_on:
#- 'server'
networks:
- net
networks:
net:
driver: bridge
# Run docker-compose up db (Only development environment) to run only a database
# ports:
# - '49160:3000' - 49190 to see in browser
# environment:
# - HOST=0.0.0.0
# - PORT=3000 - to connect from client container
# if change - PORT:3000 in server need to change the same in - API_URL=http://server_nuxt_crud:3000/
# and works but ports: 49160 doesn't work