-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
130 lines (125 loc) · 3.61 KB
/
docker-compose.yaml
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
services:
backend:
restart: no
container_name: beachwoodfinancial_development_backend
# image: beachwoodfinancial_development_webapp_image
environment:
- TERM=xterm-256color
- COLOR_PROMPT=yes
- LANG=C.UTF-8
- PYTHONUNBUFFERED=1
- PYTHONDONTWRITEBYTECODE=1
- PIP_DISABLE_PIP_VERSION_CHECK=1
- PIP_PROGRESS_BAR=on
- ENV_VAR=development
tty: true
stdin_open: true
build:
context: ./
dockerfile: ./docker/django/Dockerfile
args:
BUILD_ENV: development
progress: plain
working_dir: /beachwoodfinancial_development/src
ports:
- "8000:8000" # Expose port 8000 for Nginx to forward traffic
volumes:
- ./staticfiles:/beachwoodfinancial_development/src/staticfiles # Bind static folder
- ./media:/beachwoodfinancial_development/src/media # Bind media folder
- type: bind
source: .
target: /beachwoodfinancial_development
env_file:
- ./src/.env/.env_docker
command: /start
depends_on:
- db
# - cache
# - frontend
# frontend:
# build:
# context: ./ # Create a Node.js Dockerfile in this directory
# dockerfile: ./docker/nodejs/Dockerfile
# container_name: beachwoodfinancial_development_frontend
# environment:
# - NODE_ENV=development
# - TERM=xterm-256color
# - COLOR_PROMPT=yes
# working_dir: /app
# volumes:
# - ./src/frontend:/app:z # Bind the Node.js app folder
# - ./staticfiles:/app/staticfiles:z # Shared volume for static files
# - ./media:/app/media # Shared volume for media files
# ports:
# - "9091:9091" # Expose port 9091 for the Node.js app
# depends_on:
# - backend # Ensuring the backend is ready before Node.js starts
# command: npm run build # Replace this with the actual start command for your Node.js app
# networks:
# - hosting_network
db:
image: postgres:alpine
tty: true
stdin_open: true
container_name: beachwoodfinancial_development_db
ports:
- "5433:5432"
expose:
- "5432"
volumes:
- pgdata:/var/lib/postgresql/data:Z
environment:
- TERM=xterm-256color
- COLOR_PROMPT=yes
- LANG=C.UTF-8
- POSTGRES_USER=postgres
- POSTGRES_DB=beachwoodfinancial_development
- POSTGRES_PASSWORD=postgres
- POSTGRES_PORT=5432
- POSTGRES_HOST_AUTH_METHOD=trust
- ENV_VAR=development
# cache:
# restart: always
# container_name: beachwoodfinancial_development_cache
# ports:
# - "6379:6379"
# image: valkey/valkey # Keeping your custom Redis image
# expose:
# - 6379
# environment:
# - TERM=xterm-256color
# - COLOR_PROMPT=yes
# - LANG=C.UTF-8
# - ENV_VAR=development
nginx:
image: nginx:latest
build:
context: .
dockerfile: ./docker/nginx/Dockerfile
ports:
- "80:80"
volumes:
- ./staticfiles:/home/static/staticfiles # Bind static files
- ./media:/home/media/media # Bind media files
depends_on:
- backend
- db
# - cache # Added db and cache dependencies
environment:
- TERM=xterm-256color
- COLOR_PROMPT=yes
- LANG=C.UTF-8
cloudflaretunnel:
image: cloudflare/cloudflared:latest
container_name: beachwoodfinancial_development_cloudflaretunnel
entrypoint: [ "cloudflared", "tunnel", "--no-autoupdate", "run", "--token", "$CLOUDFLARE_TUNNEL_TOKEN" ]
env_file:
- ./src/.env/.env_cloudflare
networks:
- hosting_network
networks:
hosting_network:
volumes:
pgdata:
staticfiles:
mediafiles: