Skip to content

Commit c2ca83a

Browse files
committed
trying to deploy to render
1 parent 8d4c659 commit c2ca83a

10 files changed

+79
-39
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ node_modules/
6161

6262
# webpack output
6363
dist/*
64-
public/
64+
!public/
65+
!public/*
6566

6667
# ignore the dist directory were our bundle files are going to be
6768
!.gitkeep

.render-buildpacks.json

-6
This file was deleted.

Dockerfile.render

+10-30
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,13 @@
1-
# "v2-" stacks use our new, more rigorous buildpacks management system. They
2-
# allow you to use multiple buildpacks in a single application, as well as to
3-
# use custom buildpacks. We do not support using the original stack images with
4-
# @renderinc/heroku-import v3.0.0 and above.
5-
ARG HEROKU_STACK=v2-heroku-22
6-
FROM ghcr.io/renderinc/heroku-app-builder:${HEROKU_STACK} AS builder
1+
FROM node:16
72

8-
# The FROM statement above triggers the following steps
9-
# 1. Copy the contents of the directory containing this Dockerfile to a Docker image
10-
# 2. Build the app using the appropriate Heroku buildpacks. This supports both Heroku and custom buildpacks.
3+
RUN apt update \
4+
&& apt install software-properties-common \
5+
&& add-apt-repository ppa:deadsnakes/ppa \
6+
&& apt update \
7+
&& apt install python3.10
118

12-
# For running the app, we use a clean base image and also one without Ubuntu development packages
13-
# https://devcenter.heroku.com/articles/heroku-20-stack#heroku-20-docker-image
14-
FROM ghcr.io/renderinc/heroku-app-runner:${HEROKU_STACK} AS runner
9+
WORKDIR /opt/app
10+
COPY --from=build /opt/app/venv /venv
1511

16-
# Copy build artifacts to runtime image
17-
COPY --from=builder --chown=1000:1000 /render /render/
18-
COPY --from=builder --chown=1000:1000 /app /app/
19-
20-
# Switch to non-root user
21-
USER 1000:1000
22-
WORKDIR /app
23-
24-
# Source all /app/.profile.d/*.sh files before process start.
25-
# These are created by buildpacks.
26-
# https://devcenter.heroku.com/articles/buildpack-api#profile-d-scripts
27-
ENTRYPOINT [ "/render/setup-env" ]
28-
29-
# 3. By default, run the 'web' process type defined in the app's Procfile
30-
# You may override the process type that is run by replacing 'web' with another
31-
# process type name in the CMD line below. That process type must have been
32-
# defined in the app's Procfile during build.
33-
CMD [ "/render/process/web" ]
12+
ENV PATH="/opt/app/venv/bin:$PATH"
13+
ENV NODE_ENV=container

public/4geeks.ico

19.3 KB
Binary file not shown.

public/bundle.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/bundle.js.LICENSE.txt

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/*
2+
object-assign
3+
(c) Sindre Sorhus
4+
@license MIT
5+
*/
6+
7+
/**
8+
* React Router DOM v6.3.0
9+
*
10+
* Copyright (c) Remix Software Inc.
11+
*
12+
* This source code is licensed under the MIT license found in the
13+
* LICENSE.md file in the root directory of this source tree.
14+
*
15+
* @license MIT
16+
*/
17+
18+
/**
19+
* React Router v6.3.0
20+
*
21+
* Copyright (c) Remix Software Inc.
22+
*
23+
* This source code is licensed under the MIT license found in the
24+
* LICENSE.md file in the root directory of this source tree.
25+
*
26+
* @license MIT
27+
*/
28+
29+
/** @license React v0.19.1
30+
* scheduler.production.min.js
31+
*
32+
* Copyright (c) Facebook, Inc. and its affiliates.
33+
*
34+
* This source code is licensed under the MIT license found in the
35+
* LICENSE file in the root directory of this source tree.
36+
*/
37+
38+
/** @license React v16.14.0
39+
* react-dom.production.min.js
40+
*
41+
* Copyright (c) Facebook, Inc. and its affiliates.
42+
*
43+
* This source code is licensed under the MIT license found in the
44+
* LICENSE file in the root directory of this source tree.
45+
*/
46+
47+
/** @license React v16.14.0
48+
* react.production.min.js
49+
*
50+
* Copyright (c) Facebook, Inc. and its affiliates.
51+
*
52+
* This source code is licensed under the MIT license found in the
53+
* LICENSE file in the root directory of this source tree.
54+
*/

public/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!doctype html><html class="h-100"><head><meta name="viewport" content="width=device-width,initial-scale=1"><meta charset="UTF-8"><title>Hello Rigo with Vanilla.js</title><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"><link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous"><link rel="icon" href="/4geeks.ico"><script defer="defer" src="/bundle.js"></script></head><body class="h-100"><div id="app" class="h-100"></div><script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-7+zCNj/IqJ95wo16oMtfsKbZ9ccEh31eOz1HGyDuCQ6wgnyJNSYdrPa03rtR1zdB" crossorigin="anonymous"></script><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-QJHtvGhmr9XOIpI6YVutG+2QOK9T+ZnN4kzFN1RtK3zEFEIsxhlmWl5/YESvpZ13" crossorigin="anonymous"></script></body></html>

public/rigo-baby.jpg

30.6 KB
Loading

render.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
services:
55
- type: web # valid values: https://render.com/docs/yaml-spec#type
66
name: sample-service-name
7-
env: docker # valid values: https://render.com/docs/yaml-spec#environment
8-
dockerfilePath: Dockerfile.render
7+
env: python # valid values: https://render.com/docs/yaml-spec#environment
8+
buildCommand: "./build.sh"
9+
startCommand: "gunicorn wsgi --chdir ./src/"
910
plan: free # optional; defaults to starter
1011
numInstances: 1
1112
envVars:

render_build.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
# exit on error
3+
set -o errexit
4+
5+
pipenv install
6+
7+
pipenv run upgrade

0 commit comments

Comments
 (0)