Skip to content

Commit

Permalink
Fix environmental issues in installer.
Browse files Browse the repository at this point in the history
  • Loading branch information
ibz authored Jan 18, 2024
1 parent ea8bfa2 commit 1ad70dd
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 22 deletions.
1 change: 1 addition & 0 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
build:
args:
- BUILD_MODE=-production
env_file: .env.prod
api:
healthcheck:
test: ["CMD", "curl", "-f", "https://plebeian.market/api/healthcheck"]
Expand Down
1 change: 1 addition & 0 deletions docker-compose.staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ services:
dockerfile: web/Dockerfile
args:
- BUILD_MODE=-staging
env_file: .env.staging
restart: always
depends_on:
- api
Expand Down
20 changes: 6 additions & 14 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ echo "{\"NSEC\": \"\", \"XPUB\": \"\", \"LIGHTNING_ADDRESS\": \"\"}" > plebeian-

cd && mkdir -p plebeian-market-state/media

cat << EOF > .env.api
cat << EOF > .env
ENV=prod
FLASK_APP=main
LOG_LEVEL=INFO
Expand All @@ -55,9 +55,9 @@ PROCESSED_EVENT_IDS_FILENAME=/state/processed_event_ids.txt
VERIFIED_EXTERNAL_IDENTITIES_FILENAME=/state/verified_external_identities.txt
GECKODRIVER_BINARY=/app/geckodriver
EOF
echo "DOMAIN_NAME=$DOMAIN_NAME" >> .env.api
echo "WWW_BASE_URL=https://$DOMAIN_NAME" >> .env.api
echo "API_BASE_URL=https://$DOMAIN_NAME" >> .env.api
echo "DOMAIN_NAME=$DOMAIN_NAME" >> .env
echo "WWW_BASE_URL=https://$DOMAIN_NAME" >> .env
echo "API_BASE_URL=https://$DOMAIN_NAME" >> .env

cd && mkdir -p plebeian-market-nginx
cat << EOF > plebeian-market-nginx/app.conf
Expand Down Expand Up @@ -120,14 +120,6 @@ server {
}
EOF

cat << EOF > .env.web
VITE_NOSTR_MARKET_SQUARE_CHANNEL_ID="TODO"
VITE_NOSTR_PM_STALL_ID="TODO"
VITE_NOSTR_PM_STALL_PUBLIC_KEY="TODO"
EOF
echo "VITE_BASE_URL=https://$DOMAIN_NAME/" >> .env.web
echo "VITE_API_BASE_URL=https://$DOMAIN_NAME/" >> .env.web

cat << EOF > docker-compose.yml
version: '3.6'
Expand Down Expand Up @@ -159,7 +151,7 @@ services:
volumes:
- "./plebeian-market-secrets:/secrets"
- "./plebeian-market-state:/state"
env_file: .env.api
env_file: .env
command: gunicorn --preload --chdir /app main:app -w 2 --threads 2 -b 0.0.0.0:8080
birdwatcher:
image: ghcr.io/plebeiantech/plebeian-market-birdwatcher
Expand All @@ -178,7 +170,7 @@ services:
- web_network
depends_on:
- api
env_file: .env.web
env_file: .env
volumes:
- "buyer-app-static-content:/buyer-app"
nginx:
Expand Down
4 changes: 2 additions & 2 deletions web/backoffice/.env.production
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
VITE_BASE_URL=https://plebeian.market/
VITE_API_BASE_URL=https://plebeian.market/
VITE_BASE_URL=$WWW_BASE_URL
VITE_API_BASE_URL=$API_BASE_URL
VITE_NOSTR_MARKET_SQUARE_CHANNEL_ID="dd7aee9576b3d85287c37808cec29260d1a97e83bee4f15153d52851ff7db719"
4 changes: 2 additions & 2 deletions web/backoffice/.env.staging
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VITE_BASE_URL=https://staging.plebeian.market/
VITE_API_BASE_URL=https://staging.plebeian.market/
VITE_BASE_URL=$WWW_BASE_URL
VITE_API_BASE_URL=$API_BASE_URL
4 changes: 2 additions & 2 deletions web/frontoffice/.env.production
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VITE_BASE_URL=https://plebeian.market/
VITE_API_BASE_URL=https://plebeian.market/
VITE_BASE_URL=$WWW_BASE_URL
VITE_API_BASE_URL=$API_BASE_URL
VITE_NOSTR_MARKET_SQUARE_CHANNEL_ID="dd7aee9576b3d85287c37808cec29260d1a97e83bee4f15153d52851ff7db719"
VITE_NOSTR_PM_STALL_PUBLIC_KEY="28c62ad00fe085a7b2b54a05fdf333367e3e6a4d9650ad1c159f964705b76928"
4 changes: 2 additions & 2 deletions web/frontoffice/.env.staging
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VITE_BASE_URL=https://staging.plebeian.market/
VITE_API_BASE_URL=https://staging.plebeian.market/
VITE_BASE_URL=$WWW_BASE_URL
VITE_API_BASE_URL=$API_BASE_URL

0 comments on commit 1ad70dd

Please sign in to comment.