diff --git a/.dockerignore b/.dockerignore index 390c521..64bab22 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,4 @@ **/node_modules -build \ No newline at end of file +build +.env +.env.sample \ No newline at end of file diff --git a/.env.sample b/.env.sample new file mode 100644 index 0000000..360496a --- /dev/null +++ b/.env.sample @@ -0,0 +1,2 @@ +REACT_APP_BACKEND_LOCATION=https://logic-staging.tallypeer.com +REACT_APP_API=api/v1 \ No newline at end of file diff --git a/Dockerfile.dev b/Dockerfile.dev index dfaab57..fe40611 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -5,6 +5,8 @@ WORKDIR /app COPY package.json . COPY yarn.lock . RUN yarn install +ENV REACT_APP_BACKEND_LOCATION=https://localhost:3001 +ENV REACT_APP_API=api/v1 # Copy app files COPY . . # Expose port diff --git a/Dockerfile.prod b/Dockerfile.prod index ae50d4b..a3bf05f 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -5,6 +5,8 @@ WORKDIR /app COPY package.json . COPY yarn.lock . RUN yarn install +ENV REACT_APP_BACKEND_LOCATION=https://logic.tallypeer.com +ENV REACT_APP_API=api/v1 # Copy app files COPY . . # Expose port diff --git a/Dockerfile.staging b/Dockerfile.staging index 5d88bc7..260a0f9 100644 --- a/Dockerfile.staging +++ b/Dockerfile.staging @@ -5,6 +5,8 @@ WORKDIR /app COPY package.json . COPY yarn.lock . RUN yarn install +ENV REACT_APP_BACKEND_LOCATION=https://logic-staging.tallypeer.com +ENV REACT_APP_API=api/v1 # Copy app files COPY . . # Expose port diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 8038e6b..c55e54e 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -1,10 +1,6 @@ version: "3.9" services: react: - environment: - REACT_APP_BACKEND_LOCATION: http://localhost:3001 - REACT_APP_API: api/v1 - container_name: "dework_frontend" build: dockerfile: Dockerfile.dev diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index beaabc9..13a8ae6 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -3,8 +3,6 @@ services: react: image: registry.digitalocean.com/dework/react:latest environment: - REACT_APP_BACKEND_LOCATION: logic.tallypeer.com - REACT_APP_API: api/v1 VIRTUAL_HOST: tallypeer.com LETSENCRYPT_HOST: tallypeer.com diff --git a/docker-compose.staging.yml b/docker-compose.staging.yml index d60db00..b8b586c 100644 --- a/docker-compose.staging.yml +++ b/docker-compose.staging.yml @@ -3,8 +3,6 @@ services: react: image: registry.digitalocean.com/dework/react_staging:latest environment: - REACT_APP_BACKEND_LOCATION: logic-staging.tallypeer.com - REACT_APP_API: api/v1 VIRTUAL_HOST: staging.tallypeer.com LETSENCRYPT_HOST: staging.tallypeer.com