-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need Deployment (AWS) docs #19
Comments
Update:
Create new Task Definitions for each contaner For now I can run frontend and db containers. The API container keep crashing. |
I am not sure yet, as my DevOps team setup my k8s cluster in EC2. However, I will likely be using GCE for my upcoming deployments... I will update this ticket in due course. |
I use ecs.yml to bootstrap the ecs not docker-compose and run it like this
I've build nginx containers to avoid Volumes usage
What else else I need to change and think about? |
The full Task definicion that ecs.yml run
|
I will not have time to look at this in depth for a little while. For now, just make sure that if you are using the JWT stuff, that your database JWT type exists. Also, double-check graphiql port as well as api port (3000 / 3001). Are you also trying to deploy the database? If so, I suggest instead using RDS in production. Otherwise, make sure your DB permissions are correct. That your app user can access the account.jwt type (or whatever you call it). Also that your SD functions are deployed by the superuser. Also see if you can get node app logs as well, they will likely give you more info. |
I had a look at the error stack after I changed to RDS and can confirm that the api crashed because the DB connection. |
Now the task definition stops because of nginx. proxy_pass http://api:3000;`
depends_on specified. RUN rm /etc/nginx/conf.d/* COPY default.conf /etc/nginx/conf.d/ |
Here is my ports
|
I'm having this error
I tried to add
to the config but it does not work. |
@Antibioticvz this is likely the line causing problems: https://github.com/chadfurman/rpg-boilerplate/blob/master/frontend/frontend.nginx.site#L63 You will want to make sure frontend on that line is replaced by a host / proxy_pass path that your deployment's nginx pod understands |
I was able to start and run all 4 containers with this fix
and the same with the frontend now if I expose port 3000 for the instance and try https://instance-ip:3000 I can see the nginx (502 Bad Gateway) but the https://instance-ip is not available. |
When I expose 3030 and try http://instance-ip:3030 I can see this errors and bg of the frontend |
Log
|
How do we need to specify |
ahh this looks like the SSR errors. I regret to inform you that the SSR does not yet work. The This is 100% a bug. #24 |
I would also take a look at the response coming in for that network request...
So for me, this would be something like https://mysite.com/api where the frontend lives at https://mysite.com |
|
|
Does this mean that RDS was able to help? You got past the first issue w/ the DB / API not starting? |
Do you have a nginx config working on server container not local? can you post it? |
Hmm yes/no. I have a config for a container in my cluster. I cannot share it, but I do not think it would help you either way. You are using ECS and RDS in AWS, right? I have only worked with EC2, so I have questions:
Does that docker-compose-ish yml build the ECS environment? |
|
yes
yes. yes all welcome
no. connect() failed (111: Connection refused)
yes. api shows 502 and frontend renders bg img. I can not see my frontend at https://ip. Looks like the nginx-frontend does not map correctly |
https://ip will not work, because you have not exposed any service on port 80 nor port 443 (only on port 3000 / 3001 etc. see #19 (comment)) you could try https://ip:3000 but then maybe what you mean is https://hostname:3000 ? is your nginx setup to receive / translate ip-based requests correctly? Also, if your frontend cannot talk to your API (it should see the same messages you do and use the same URLs you do), that is also a problem. Getting them to talk is a matter of using the right URLs, using the right security settings, and making sure both of the node apps are running and exposing the ports you expect. |
Please paste your full nginx config. What was that yml? Is that what you use to build a cluser in ECS? |
missing details, there. Why did the app crash? why does it say killed? Otherwise, the started messages look fine...` |
Create cluster and cloud formation ecs.yml
|
To compose this I use |
frontend config
|
api config
|
I have not forgot about this. I hope to have time to work on this tonight or this week. |
I'm trying to run this project on ECS.
My steps
1 Cluster created ( Registered container instances 5? do we need 4 or 5)
2 Created repositories for api, frontend, db
3 Builded 3 images from individual folder
cd api && docker build -t the_api .
4 docker push :latest
I'm here for now
Can any one help with following questions
Do we need to build nginx image and upload it to ECS?
How to start all tasks on server? (Like as usual through the Task Definition?)
Any related AWS/ECS multiple containers tutorials appreciated (I'm personally lost)
The text was updated successfully, but these errors were encountered: