Skip to content

Commit

Permalink
Add envs for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Saleciani committed Jun 5, 2022
1 parent 244332b commit 312dfdc
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 3 deletions.
1 change: 0 additions & 1 deletion .envSample

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
.DS_Store
.env.local
.env.development.local
.env.development
.env.production
.env.staging
.env.test.local
.env.production.local

Expand Down
13 changes: 13 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:16
# Add a work directory
WORKDIR /app
# Cache and Install dependencies
COPY package.json .
COPY yarn.lock .
RUN yarn install
# Copy app files
COPY . .
# Expose port
EXPOSE 3000
# Start the app
CMD [ "yarn", "start", "--env=development" ]
13 changes: 13 additions & 0 deletions Dockerfile.prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:16
# Add a work directory
WORKDIR /app
# Cache and Install dependencies
COPY package.json .
COPY yarn.lock .
RUN yarn install
# Copy app files
COPY . .
# Expose port
EXPOSE 3000
# Start the app
CMD [ "yarn", "start", "--env=production" ]
2 changes: 1 addition & 1 deletion Dockerfile → Dockerfile.staging
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ COPY . .
# Expose port
EXPOSE 3000
# Start the app
CMD [ "yarn", "start" ]
CMD [ "yarn", "start", "--env=staging" ]
2 changes: 1 addition & 1 deletion docker-compose.yml → docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:

container_name: "dework_frontend"
build:
dockerfile: Dockerfile
dockerfile: Dockerfile.dev
context: .
ports:
- "3000:3000"
16 changes: 16 additions & 0 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: "3.9"
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

container_name: "dework_frontend"

networks:
default:
external:
name: proxy
16 changes: 16 additions & 0 deletions docker-compose.staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: "3.9"
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

container_name: "dework_frontend_staging"

networks:
default:
external:
name: proxy

0 comments on commit 312dfdc

Please sign in to comment.