Skip to content

Commit fa116e2

Browse files
author
Pierre-Yves Christmann
committed
Add docker-compose setup
1 parent a3b96aa commit fa116e2

File tree

1,362 files changed

+1218
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,362 files changed

+1218
-6
lines changed

.yarn/install-state.gz

-26.9 KB
Binary file not shown.

README.md

Lines changed: 44 additions & 6 deletions

docker-compose.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
version: '3.9'
2+
3+
##
4+
networks:
5+
apism_network:
6+
7+
##
8+
services:
9+
10+
## APISM training example API
11+
apism.api:
12+
container_name: apism.api
13+
hostname: apism.api
14+
image: docker.io/library/node:21.2.0-bullseye
15+
working_dir: /app
16+
ports:
17+
- "3000:3000"
18+
volumes:
19+
- ./src:/app
20+
networks:
21+
- apism_network
22+
command: >
23+
bash -c "
24+
yarn &&
25+
yarn watch
26+
"
27+
28+
## Hoppscotch
29+
apism.hoppscotch:
30+
container_name: apism.hoppscotch
31+
hostname: apism.hoppscotch
32+
image: docker.io/hoppscotch/hoppscotch:2023.8.4
33+
ports:
34+
- "8080:3000" # hoppscotch-frontend
35+
- "8090:3100" # hoppscotch-admin
36+
- "8070:3170" # hoppscotch-backend
37+
restart: on-failure
38+
env_file: ./docker/hoopscotch.env
39+
depends_on:
40+
- apism.hoppscotch.db
41+
networks:
42+
- apism_network
43+
44+
apism.hoppscotch.db:
45+
container_name: apism.hoppscotch.db
46+
hostname: apism.hoppscotch.db
47+
image: docker.io/library/postgres:16.1-bullseye
48+
restart: always
49+
networks:
50+
- apism_network
51+
environment:
52+
- POSTGRES_USER=hoppscotch
53+
- POSTGRES_PASSWORD=postgres
54+
# ports:
55+
# - '5432:5432'
56+
userns_mode: "keep-id"
57+
volumes:
58+
- ./docker/volumes/hoppscotch_db:/var/lib/postgresql/data
59+
60+
## Self-hosted SMTP server
61+
apism.smtp:
62+
container_name: apism.smtp
63+
hostname: apism.smtp
64+
image: docker.io/mailhog/mailhog:v1.0.1
65+
networks:
66+
- apism_network
67+
ports:
68+
- "8025:8025" # web ui
69+
# - "1025:1025" # smtp server
70+

docker/hoopscotch.env

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#-----------------------Backend Config------------------------------#
2+
# Prisma Config
3+
DATABASE_URL=postgresql://hoppscotch:[email protected]:5432/hoppscotch
4+
5+
# Auth Tokens Config
6+
JWT_SECRET=secret1233
7+
TOKEN_SALT_COMPLEXITY=10
8+
MAGIC_LINK_TOKEN_VALIDITY=3
9+
# Default validity is 7 days (604800000 ms) in ms
10+
REFRESH_TOKEN_VALIDITY=604800000
11+
# Default validity is 1 day (86400000 ms) in ms
12+
ACCESS_TOKEN_VALIDITY=86400000
13+
SESSION_SECRET=apism secret
14+
15+
# Hoppscotch App Domain Config
16+
REDIRECT_URL=http://localhost:8080
17+
WHITELISTED_ORIGINS=http://localhost:8080,http://localhost:8090,http://localhost:8070,http://localhost:3000
18+
VITE_ALLOWED_AUTH_PROVIDERS=EMAIL
19+
# VITE_ALLOWED_AUTH_PROVIDERS = GOOGLE,GITHUB,MICROSOFT,EMAIL
20+
21+
# Google Auth Config
22+
# GOOGLE_CLIENT_ID="************************************************"
23+
# GOOGLE_CLIENT_SECRET="************************************************"
24+
# GOOGLE_CALLBACK_URL="http://localhost:3170/v1/auth/google/callback"
25+
# GOOGLE_SCOPE="email,profile"
26+
27+
# Github Auth Config
28+
# GITHUB_CLIENT_ID="************************************************"
29+
# GITHUB_CLIENT_SECRET="************************************************"
30+
# GITHUB_CALLBACK_URL="http://localhost:3170/v1/auth/github/callback"
31+
# GITHUB_SCOPE="user:email"
32+
33+
# Microsoft Auth Config
34+
# MICROSOFT_CLIENT_ID="************************************************"
35+
# MICROSOFT_CLIENT_SECRET="************************************************"
36+
# MICROSOFT_CALLBACK_URL="http://localhost:3170/v1/auth/microsoft/callback"
37+
# MICROSOFT_SCOPE="user.read"
38+
# MICROSOFT_TENANT="common"
39+
40+
# Mailer config
41+
# MAILER_SMTP_URL=smtp://127.0.0.1:1025
42+
MAILER_SMTP_URL=smtp://apism.smtp:1025
43+
MAILER_ADDRESS_FROM=[email protected]
44+
45+
# Rate Limit Config
46+
# In seconds
47+
RATE_LIMIT_TTL=60
48+
# Max requests per IP
49+
RATE_LIMIT_MAX=100
50+
51+
52+
#-----------------------Frontend Config------------------------------#
53+
54+
# Base URLs
55+
VITE_BASE_URL=http://localhost:8080
56+
VITE_SHORTCODE_BASE_URL=http://localhost:8080
57+
VITE_ADMIN_URL=http://localhost:8090
58+
59+
# Backend URLs
60+
VITE_BACKEND_GQL_URL=http://localhost:8070/graphql
61+
VITE_BACKEND_WS_URL=ws://localhost:8070/graphql
62+
VITE_BACKEND_API_URL=http://localhost:8070/v1
63+
64+
# Terms Of Service And Privacy Policy Links (Optional)
65+
VITE_APP_TOS_LINK=https://docs.hoppscotch.io/support/terms
66+
VITE_APP_PRIVACY_POLICY_LINK=https://docs.hoppscotch.io/support/privacy
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
16
8 KB
Binary file not shown.
8 KB
Binary file not shown.
120 KB
Binary file not shown.
24 KB
Binary file not shown.
8 KB
Binary file not shown.

0 commit comments

Comments
 (0)