-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
110 lines (102 loc) · 2.15 KB
/
docker-compose.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
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
services:
frontend:
restart: always
container_name: frontend_container
build: ./frontend
volumes:
- ./frontend:/usr/src/app
- /usr/src/app/node_modules
- /usr/src/app/.next
ports:
- 3000:3000
backend:
container_name: backend_container
build: ./backend
ports:
- 4000:4000
environment:
PORT: 4000
DB_HOST: postgres
DB_PORT: 5432
DB_USER: postgres
DB_PASSWORD: postgres
DB_NAME: postgres
SESSION_SECRET: randomizedstringaasdfasdf
CORS_ORIGIN: http://simplifystudying.com
depends_on:
postgres:
condition: service_healthy
links:
- postgres
- redis
restart: always
networks:
- mynet
# nginx-proxy:
# image: nginx
# container_name: nginx-proxy
# restart: always
# ports:
# - "443:443"
# - "80:80"
# volumes:
# - ./www:/var/www:ro
# - ./conf.d:/etc/nginx/conf.d:ro
# - ./ssl:/etc/nginx/ssl:ro
# - ./snippets:/etc/nginx/snippets:ro
# - ./protect:/etc/nginx/protect:ro
# networks:
# - mynet
postgres:
container_name: postgres
image: postgres
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- "5432:5432"
volumes:
- notecard-app:/var/lib/postgresql/data
networks:
- mynet
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
# pgadmin:
# image: dpage/pgadmin4
# container_name: pgadmin
# restart: always
# ports:
# - "5050:80"
# environment:
# PGADMIN_DEFAULT_EMAIL: [email protected]
# PGADMIN_DEFAULT_PASSWORD: admin
# networks:
# - mynet
# volumes:
# - pgadmin-data:/var/lib/pgadmin
redis:
image: redis
container_name: redis
expose:
- 6379
ports:
- 6379:6379
networks:
- mynet
volumes:
- redis-data:/data
volumes:
notecard-app:
driver: local
redis-data:
driver: local
pgadmin-data:
driver: local
networks:
mynet:
driver: bridge