-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
91 lines (91 loc) · 2.1 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
version: '3'
services:
server:
image: postgrest/postgrest
ports:
- "3000:3000"
environment:
PGRST_DB_URI: postgres://test_user:123456@db:5432/blog
#PGRST_OPENAPI_SERVER_PROXY_URI: http://127.0.0.1:3000
PGRST_OPENAPI_SERVER_PROXY_URI: https://domain.com/
PGRST_DB_SCHEMA: public
PGRST_DB_ANON_ROLE: web_anon
PGRST_JWT_SECRET: "varmB8bXwQzn91ZLxHFJhXEy6S3cN3sB"
PGRST_JWT_ROLE_CLAIM_KEY: ".role"
PGRST_SERVER_CORS_ALLOWED_ORIGINS: "https://domain.com,http://domain.com,http://domain.com:8080"
PGRST_DB_MAX_ROWS: 100
depends_on:
- db
networks:
- app-network
restart: always
db:
image: postgres
ports:
- "5432:5432"
environment:
POSTGRES_DB: blog
POSTGRES_USER: postgres
POSTGRES_PASSWORD: 123456
# comment volumes this if you want to no persist the data.
volumes:
- "./pgdata:/var/lib/postgresql/data"
networks:
- app-network
restart: always
swagger:
image: swaggerapi/swagger-ui
ports:
- "8080:8080"
expose:
- "8080"
environment:
API_URL: https://domain.com
networks:
- app-network
restart: always
socket:
image: node:14
working_dir: /app
volumes:
- ./socket:/app
command: "npm start"
ports:
- "4000:4000"
depends_on:
- db
environment:
PGHOST: db
PGUSER: test_user
PGPASSWORD: 123456
PGDATABASE: blog
networks:
- app-network
restart: always
nginx:
image: nginx:latest
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./letsencrypt:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
ports:
- "80:80"
- "443:443"
depends_on:
- server
- socket
networks:
- app-network
restart: always
certbot:
image: certbot/certbot
command: certonly --webroot --webroot-path=/var/www/certbot/ -d domain.com
volumes:
- ./letsencrypt:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
networks:
- app-network
restart: no
networks:
app-network:
driver: bridge