Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Hey,
Like the title says, it seems like the environment variables are not working for my static site on App Platform.
I’m using create-react-app to build my React project.
This is my environment variable setup inside of App Platform: https://imgur.com/7fil5A7
I’ve added console logs to print out process.env, this is the result: https://imgur.com/BpDbZjv
NOTE: The logs I added can be found here: https://github.com/stadro/web-app/blob/development/src/index.tsx
Like you can see, it doesn’t detect the environment variables specified inside of App Platform. Any idea what I’m doing wrong?
Project on GitHub: https://github.com/stadro/web-app/tree/development Project on DigitalOcean: https://stadro-qw44y.ondigitalocean.app/ DigitalOcean App Platform Spec:
name: stadro
region: ams
databases:
- name: database
engine: PG
version: "12"
size: db-s-dev-database
num_nodes: 1
services:
- name: server
http_port: 3000
instance_count: 1
instance_size_slug: basic-xxs
dockerfile_path: Dockerfile.development
routes:
- path: /api
github:
branch: development
deploy_on_push: true
repo: stadro/server
envs:
- key: NODE_ENV
scope: RUN_AND_BUILD_TIME
value: development
- key: DOMAIN
scope: RUN_AND_BUILD_TIME
value: ${_self.PUBLIC_URL}
- key: POSTGRES_HOST
scope: RUN_AND_BUILD_TIME
value: ${database.HOSTNAME}
- key: POSTGRES_PORT
scope: RUN_AND_BUILD_TIME
value: ${database.PORT}
- key: POSTGRES_USER
scope: RUN_AND_BUILD_TIME
value: ${database.USERNAME}
- key: POSTGRES_PASSWORD
scope: RUN_AND_BUILD_TIME
value: ${database.PASSWORD}
- key: POSTGRES_DATABASE
scope: RUN_AND_BUILD_TIME
value: ${database.DATABASE}
- key: POSTGRES_CA_CERT
scope: RUN_AND_BUILD_TIME
value: ${database.CA_CERT}
static_sites:
- name: web-app
environment_slug: node-js
build_command: yarn start:development
routes:
- path: /
github:
branch: development
deploy_on_push: true
repo: stadro/web-app
envs:
- key: NODE_ENV
scope: BUILD_TIME
value: development
- key: SERVER_URL
scope: BUILD_TIME
value: ${server.PUBLIC_URL}
James Wood
Shane Corn
Faizan Younas Tanooli
clea-peixoto
StrugglingDeveloper
Hamza kholti
Charley Kiser
31294f7ccf774ac7b3508a6438b989
Matthew Narrell
hello