Skip to content

Commit 472fb52

Browse files
committed
added cloud docker-compose
1 parent d39685b commit 472fb52

1 file changed

Lines changed: 67 additions & 0 deletions

File tree

docker-compose-cloud.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
version: "3.8"
2+
3+
services:
4+
postgres:
5+
image: postgres:alpine
6+
environment:
7+
POSTGRES_DB: httpsms
8+
POSTGRES_PASSWORD: dbpassword
9+
POSTGRES_USER: dbusername
10+
volumes:
11+
- postgres:/var/lib/postgresql/data
12+
ports:
13+
- "5435:5432"
14+
restart: on-failure
15+
healthcheck:
16+
test: ["CMD-SHELL", "pg_isready", "-U", "dbusername", "-d", "httpsms"]
17+
interval: 30s
18+
timeout: 60s
19+
retries: 5
20+
start_period: 5s
21+
networks:
22+
- http-sms-network
23+
24+
redis:
25+
image: redis:latest
26+
command: redis-server
27+
volumes:
28+
- redis:/var/lib/redis
29+
ports:
30+
- "6379:6379"
31+
restart: on-failure
32+
networks:
33+
- http-sms-network
34+
35+
api:
36+
build:
37+
context: ./api
38+
ports:
39+
- "8001:8000"
40+
depends_on:
41+
postgres:
42+
condition: service_healthy
43+
redis:
44+
condition: service_started
45+
env_file:
46+
- ./api/.env
47+
networks:
48+
- http-sms-network
49+
50+
web:
51+
build:
52+
context: ./web
53+
ports:
54+
- "3001:3000"
55+
depends_on:
56+
api:
57+
condition: service_started
58+
networks:
59+
- http-sms-network
60+
61+
volumes:
62+
redis:
63+
postgres:
64+
65+
networks:
66+
http-sms-network:
67+
external: true

0 commit comments

Comments
 (0)