Skip to content

Commit e041c6e

Browse files
author
divyav-aot
committed
test gitpod
1 parent b24a365 commit e041c6e

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

.gitpod.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,31 @@ tasks:
1717
init: |
1818
cd deployment
1919
# Set CORS origins for API
20-
echo "ALLOWED_ORIGINS=\"['$(gp url 3000)']\"" >> .env
21-
echo "ALLOWED_ORIGINS set to: ['$(gp url 3000)']"
20+
export ALLOWED_ORIGINS="['$(gp url 3000)']"
21+
echo "ALLOWED_ORIGINS set to: $ALLOWED_ORIGINS"
2222
echo 'Building api container'
2323
docker-compose build api
2424
echo 'Built api'
2525
command: |
2626
gp await-port 6000
2727
cd deployment
28+
export ALLOWED_ORIGINS="['$(gp url 3000)']"
2829
echo 'Starting api container'
2930
docker-compose up -d api
3031
echo 'Started api'
3132
- name: python-backend
3233
init: |
3334
cd deployment
3435
# Set CORS origins for python-backend
35-
echo "ALLOWED_ORIGINS=\"['$(gp url 3000)']\"" >> .env
36-
echo "ALLOWED_ORIGINS set to: ['$(gp url 3000)']"
36+
export ALLOWED_ORIGINS="['$(gp url 3000)']"
37+
echo "ALLOWED_ORIGINS set to: $ALLOWED_ORIGINS"
3738
echo 'Building python-backend container'
3839
docker-compose build python-backend
3940
echo 'Built python-backend'
4041
command: |
4142
gp await-port 6000
4243
cd deployment
44+
export ALLOWED_ORIGINS="['$(gp url 3000)']"
4345
echo 'Starting python-backend container'
4446
docker-compose up -d python-backend
4547
echo 'Started python-backend'

deployment/docker-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ services:
3636
DB_PORT: 5432
3737
PORT: 5000
3838
LOG_LEVEL: info
39-
ALLOWED_ORIGINS: '["http://localhost:3000"]'
39+
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS:-'["http://localhost:3000"]'}
4040
NODE_ENV: production
4141

4242
python-backend:
@@ -54,7 +54,7 @@ services:
5454
DB_SCHEMA: public
5555
DB_PORT: 5432
5656
DATABASE_URL: "postgresql://postgres:password@postgres_db:5432/mydb"
57-
ALLOWED_ORIGINS: '["http://localhost:3000", "http://localhost:5173"]'
57+
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS:-'["http://localhost:3000", "http://localhost:5173"]'}
5858
ports:
5959
- "8300:8000"
6060
restart: unless-stopped

0 commit comments

Comments
 (0)