redwoodjs / docker Goto Github PK
View Code? Open in Web Editor NEWRepository to consolidate efforts on making sweet Docker implementations for RedwoodJS
Repository to consolidate efforts on making sweet Docker implementations for RedwoodJS
In the quest ๐ง๐ปโโ๏ธ of finding a good path to officially dockerize and support Redwood image(s) we ask for your help.
If you have a production or experimental Docker setup;
Thanks!
I'm also using a similar Docker implementation in production and ran into a busted dependency and was unable to reproduce locally. Figured the production is running a different version (because no .lock file). I understand the .lock is for whole workspace, but copying over may ensure that at least api deps are pinned to the same version as locally.
Just to be clear, we probably want to keep yarn.lock in the last stage of docker build. Just before: https://github.com/redwoodjs/docker/blob/main/docker/standal-ce-nginx/api/Dockerfile#L35
cc: @realStandal
This issue seeks to define what official RedwoodJS Docker images should be supported and maintained by the community.
Discussion on Dockerfiles and it's implementation
Suggestions
yarn rw serve
- example standal-cli-both
standal-ce-nginx
, jeliasson-nginx
standal-ce-nginx
, jeliasson-nginx
yarn rw-server api
over yarn rw serve api
Workflow | Build status |
---|---|
standal-ce-nginx |
|
standal-cli-both |
|
jeliasson-nginx |
This issue seeks to define what image name and tags that should be used when building (and publishing images for official releases).
Officially supported and built images that would be published to a Container Registry, and registered with e.g. Docker Hub.
Suggestions
redwoodjs/redwood:<version>
, e.g. redwoodjs/redwood:0.49.1
- bothredwoodjs/redwood-api:<version>
, e.g. redwoodjs/redwood-api:0.49.1
- apiredwoodjs/redwood-web:<version>
, e.g. redwoodjs/redwood-web:0.49.1
- webredwoodjs/both:<version>
, e.g. redwoodjs/both:0.49.1
- bothredwoodjs/api:<version>
, e.g. redwoodjs/api:0.49.1
- apiredwoodjs/web:<version>
, e.g. redwoodjs/web:0.49.1
- webOther
:<sha>
as tag?Development/testing built images that would be published to a Container Registry
Suggestions
redwoodjs/redwood-<implementation name>-[api/both/web]:<sha>
, e.g. redwoodjs/redwood-jeliasson-nginx-web:94e75f1
redwoodjs/redwood-<implementation name>-[api/both/web]:<sha>
, e.g. redwoodjs/redwood-standal-ce-nginx-web:94e75f1
This issue seeks to create a Docker Hub organization.
Short-term
Long-term
@thedavidprice Is the creation something you could help with? Unfortunately, Docker Inc being Docker Inc, it looks like they have put an organization behind a paywall. Because of that, I suggest just having an account created which later can be converted into an org. For now, I think we're primarily interested in making sure we reserve a handle.
This issue seeks to setup CI pipeline to build, push and publish official release images.
Things that needs some attention;
CONTAINER_REGISTRY_PASSWORD
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
@babel/node
, @babel/preset-env
)react
, react-dom
)@redwoodjs/api
, @redwoodjs/core
, @redwoodjs/forms
, @redwoodjs/graphql-server
, @redwoodjs/router
, @redwoodjs/web
)These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.
docker/ajoslin-eks/docker-compose.yml
docker/pi0neerpat-packages/docker-compose.yml
docker/ajoslin-eks/api/Dockerfile
node 14-alpine
docker/ajoslin-eks/web/Dockerfile
node 14-alpine
docker/jeliasson-nginx/api/Dockerfile
node 14-alpine
node 14-alpine
docker/jeliasson-nginx/web/Dockerfile
node 14-alpine
docker/pi0neerpat-packages/api/Dockerfile
node 16
node 16
docker/pi0neerpat-packages/web/Dockerfile
node 14
docker/standal-ce-nginx/api/Dockerfile
node 14-alpine
node 14-alpine
docker/standal-ce-nginx/web/Dockerfile
node 14-alpine
nginx 1.23.3-alpine
docker/standal-cli-both/both/Dockerfile
node 14-alpine
node 14-alpine
.github/workflows/jeliasson-nginx.yml
actions/checkout v3
docker/setup-buildx-action v2
docker/login-action v2
docker/build-push-action v4
actions/checkout v3
docker/setup-buildx-action v2
docker/login-action v2
ubuntu 20.04
ubuntu 20.04
.github/workflows/pi0neerpat-packages.yml
actions/checkout v3
docker/setup-buildx-action v2
docker/login-action v2
docker/build-push-action v4
actions/checkout v3
docker/setup-buildx-action v2
docker/login-action v2
ubuntu 20.04
ubuntu 20.04
.github/workflows/standal-ce-nginx.yml
actions/checkout v3
docker/setup-buildx-action v2
docker/login-action v2
docker/build-push-action v4
actions/checkout v3
docker/setup-buildx-action v2
docker/login-action v2
ubuntu 20.04
ubuntu 20.04
.github/workflows/standal-cli-both.yml
actions/checkout v3
docker/setup-buildx-action v2
docker/login-action v2
docker/build-push-action v4
actions/checkout v3
docker/setup-buildx-action v2
docker/login-action v2
ubuntu 20.04
ubuntu 20.04
.github/workflows/template.yml
actions/checkout v3
docker/setup-buildx-action v2
docker/login-action v2
docker/build-push-action v4
actions/checkout v3
docker/setup-buildx-action v2
docker/login-action v2
ubuntu 20.04
ubuntu 20.04
api/package.json
@redwoodjs/api ^3.8.0
@redwoodjs/graphql-server ^3.8.0
package.json
@redwoodjs/core ^3.8.0
node >=14.19 <=18.x
yarn >=1.15
yarn 3.4.1
packages/example-package/package.json
@babel/node 7.20.7
@babel/preset-env 7.20.2
nodemon 2.0.21
web/package.json
@redwoodjs/forms ^3.8.0
@redwoodjs/router ^3.8.0
@redwoodjs/web ^3.8.0
prop-types 15.8.1
react 17.0.2
react-dom 17.0.2
.nvmrc
I'm triyng to use the example from https://github.com/redwoodjs/docker/blob/main/docker/jeliasson-nginx/web/Dockerfile to deploy to docker and it seems to work fine.
But as soon as I try to access something, that needs to access one of my env variables, it crashes, because the env var is empty.
I patched around a bunch of things, and I can see in docker, that I have the expected env vars via printenv
, but I guess redwood needs them in a .env
file somewhere at some point?
CC - @jeliasson, @callingmedic911
I noticed in the Actions logs that (at least) the standal-*
images aren't using Yarn 3. This issue is to track its implementation, and provide an explanation should any additional steps be needed.
I'm also really interested in the new build-time, as I think installation is the biggest pain-point right now.
Hi there, i am trying to get these files to run: https://github.com/redwoodjs/docker/blob/main/docker/jeliasson-nginx/api/Dockerfile
in my redwood.toml i have these entries:
[web]
title = "title"
port = 8910
apiUrl = "https://api.mywebsite.de"
[api]
port = 8911
[browser]
open = true
when i use tese dockerfiles, i can build the container, but get a strange error when running the api container:
2022-12-21T16:57:54.204347334Z yarn run v1.22.19
2022-12-21T16:57:54.350077354Z $ /app/node_modules/.bin/rw-server --port 8911
2022-12-21T16:57:57.568702777Z Starting API and Web Servers...
2022-12-21T16:57:57.614089598Z {"level":30,"time":1671641877609,"pid":26,"hostname":"a0c92d1775a2","side":"web","_":[],"port":8911,"p":8911,"$0":"node_modules/.bin/rw-server","msg":"In configureFastify hook for side: web"}
2022-12-21T16:57:57.669087925Z Importing Server Functions...
2022-12-21T16:58:00.110888784Z /graphql 2441 ms
2022-12-21T16:58:00.111542111Z ...Done importing in 2443 ms
2022-12-21T16:58:00.117260234Z Took 2550 ms
2022-12-21T16:58:00.117534488Z Web server started on http://localhost:8911
2022-12-21T16:58:00.117694618Z API serving from http://localhost:8911
2022-12-21T16:58:00.117860018Z API listening on http://localhost:8911/https://api.mywebsite.de/api/
2022-12-21T16:58:00.118068076Z GraphQL endpoint at /https://api.mywebsite.de/api/graphql
2022-12-21T16:58:00.123536825Z {"level":40,"time":1671641877632,"pid":26,"hostname":"a0c92d1775a2","msg":"\"root\" path \"/app/web/dist\" must exist"}
2022-12-21T16:58:00.123570279Z {"level":30,"time":1671641877643,"pid":26,"hostname":"a0c92d1775a2","side":"api","_":[],"port":8911,"p":8911,"$0":"node_modules/.bin/rw-server","apiRootPath":"/https://api.mywebsite.de/api/","msg":"In configureFastify hook for side: api"}
2022-12-21T16:58:00.123577629Z {"level":30,"time":1671641880122,"pid":26,"hostname":"a0c92d1775a2","msg":"Server listening at http://[::]:8911"}
what is happening here in this line:
2022-12-21T16:58:00.117860018Z API listening on http://localhost:8911/https://api.mywebsite.de/api/
it seems to be somehow overwritten or so... any idea?
Cheers and thanks!
This issue seeks to setup CI pipeline to build and push development/test images.
This issue seeks to define what docker-compose files should be supported and maintained by the community.
WiP
WiP
ajcwebdev/redwood-docker-compose
(๐ dead)pi0neerpat
@jeliasson should we consider moving this repo to the RedwoodJS GitHub org? You (and anyone else) could still be the admins. I'm just thinking it might provide greater visibility and findability.
Up to you.
Per the deprecating PR for RW v1.0, rw-api-server
is no longer an acceptable entry point.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.