File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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'
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments