-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
78 lines (64 loc) · 1.95 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
version: '3'
services:
frontend_space_saver:
container_name: frontend_space_saver
build:
context: ./frontend
dockerfile: Dockerfile
# Set environment variables directly in the docker-compose file
# environment:
# ENV_VARIABLE: ${ENV_VARIABLE}
# NEXT_PUBLIC_ENV_VARIABLE: ${NEXT_PUBLIC_ENV_VARIABLE}
# Set envrionment variables based on the .env file
env_file:
- .PROD.env
volumes:
- ./frontend/src:/app/src
- ./frontend/public:/app/public
restart: always
ports:
- "${FRONTENDPORT}:${FRONTENDPORT}"
# networks:
# - my_network
# Define a network, which allows containers to communicate
# with each other, by using their container name as a hostname
#networks:
# my_network:
# external: true
spacesaver:
container_name: backend_space_saver
build:
context: ./backend
dockerfile: backend/Dockerfile
# Set environment variables directly in the docker-compose file
environment:
MONGO_URI: ${MONGO_URI} # Explicitly setting the MONGO_URI
# ENV_VARIABLE: ${ENV_VARIABLE}
# NEXT_PUBLIC_ENV_VARIABLE: ${NEXT_PUBLIC_ENV_VARIABLE}
# Set envrionment variables based on the .env file
env_file:
- .PROD.env
volumes:
- ./backend/src:/app/src
restart: always
ports:
- "${BACKENDPORT}:${BACKENDPORT}"
# networks:
# - my_network
# Define a network, which allows containers to communicate
# with each other, by using their container name as a hostname
#networks:
# my_network:
# external: true
db:
image: mongo:latest # using latest mongo image
# Set environment variables directly in the docker-compose file
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
# ENV_VARIABLE: ${ENV_VARIABLE}
# NEXT_PUBLIC_ENV_VARIABLE: ${NEXT_PUBLIC_ENV_VARIABLE}
ports:
- "27017:27017"
# networks:
# - my_network