-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yml
56 lines (55 loc) · 1.85 KB
/
docker-compose.dev.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
services:
app:
image: wesbook-front-dev
build:
context: ./client # The context will pick this directory as the "build context"
dockerfile: dev.Dockerfile # This will simply tell which dockerfile to read
volumes:
- ./client/:/usr/src/app # The path can be relative, so ./ is enough to say "the same location as the docker-compose.yml"
# ports:
# - 5173:5173
container_name: wesbook-front-dev # This will name the container hello-front-dev
nginx:
image: nginx:1.20.1
volumes:
- ./nginx.dev.conf:/etc/nginx/nginx.conf:ro
ports:
- 8080:80
container_name: reverse-proxy
depends_on:
- app # wait for the frontend container to be started
# mongo:
# image: mongo
# ports:
# - 3456:27017
# environment:
# MONGO_INITDB_ROOT_USERNAME: root
# MONGO_INITDB_ROOT_PASSWORD: example
# MONGO_INITDB_DATABASE: the_database
# volumes:
# - ./todo-backend/mongo/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js
# redis:
# image: redis:latest
# restart: always
# ports:
# - "6379:6379"
# command: ["redis-server", "--appendonly", "yes"]
# volumes:
# - ./todo-backend/redis_data:/data
server:
image: wesbook-back-dev
build:
context: ./server
dockerfile: dev.Dockerfile
volumes:
- ./server/:/usr/src/app
# ports:
# - 3001:3001
container_name: wesbook-back-dev
env_file:
- ./server/.env
# environment:
# REDIS_URL: //redis
# MONGO_URL: mongodb://the_username:the_password@mongo/the_database
# depends_on:
# - mongo