Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node:5.4
COPY package.json package.json
WORKDIR /
RUN npm install
COPY server.js /
EXPOSE 8080
CMD ["node", "/server.js"]
16 changes: 16 additions & 0 deletions backend/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: devops-first-project-backend # You'll need to manually type this out. The environment variable won't work
spec:
replicas: 2
template:
metadata:
labels: # labels to select/identify the deployment
app: devops-first-project-backend
spec: # pod spec
containers:
- name: devops-first-project-backend
image: gcr.io/devops-first-project-backend/lambda-backend-devops:v1 # image we pushed
ports:
- containerPort: 8080
1 change: 1 addition & 0 deletions gcp_backend_install_commands
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Google Compute Engine API -> Enable

export PROJECT_ID="$HOSTNAME-lambda-devops"
(set instead of export in windows)

# Create project named PROJECT_ID

Expand Down