-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (51 loc) · 1.44 KB
/
Copy pathdocker-compose.yml
File metadata and controls
59 lines (51 loc) · 1.44 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
55
56
57
58
59
#! This is the main docker-compose file, that others files extends the common docker structure from it
version: "3"
# containers that i wanna use
services:
express-docker-app:
container_name: express-docker-container
# build: . # we should write the path of DockerFile, Also i can only write . and docker compose is smart enough to search and find File
ports:
- "4000:4000" # hostPort:containerPort
env_file: # here i can use .env file and reach all vars inside it
- ./.env
depends_on:
# - mongo
- postgres
postgres:
image: postgres
restart: always
volumes:
- postgres-db:/var/lib/postgresql/data
ports:
- "5432:5432"
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
adminer:
image: adminer
restart: always
ports:
- 8080:8080
#! Because we switched to postgreSql
# mongo:
# image: mongo
# restart: always
# volumes:
# - mongo-db:/data/db # volumeName:containerPath
# environment:
# MONGO_INITDB_ROOT_USERNAME: root
# MONGO_INITDB_ROOT_PASSWORD: password
# mongo-express:
# image: mongo-express
# restart: always
# ports:
# - 8081:8081
# environment:
# ME_CONFIG_MONGODB_ADMINPASSWORD: password
# ME_CONFIG_MONGODB_ADMINUSERNAME: root
# ME_CONFIG_MONGODB_URL: mongodb://root:password@mongo:27017/
# ME_CONFIG_BASICAUTH: false
volumes:
mongo-db:
postgres-db: