Skip to content
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

feat: improve codespace init time & experience #55

Merged
merged 4 commits into from
Oct 20, 2024
Merged
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
8 changes: 7 additions & 1 deletion .devcontainer/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,10 @@ echo "export CODESPACE_WDS_SOCKET_PORT=443" >> ~/.bashrc
echo "printf \"\n\n☁️☁️☁️️ Anythink: Develop in the Cloud ☁️☁️☁️\n\"" >> ~/.bashrc
echo "printf \"\n\x1b[31m \x1b[1m👉 Type: \\\`docker compose up\\\` to run the project. 👈\n\n\"" >> ~/.bashrc

nohup bash -c "cd /wilco-agent && node agent.js &" >> /tmp/agent.log 2>&1
nohup bash -c "cd /wilco-agent && node agent.js &" >> /tmp/agent.log 2>&1

# Check if docker is installed
if command -v docker &> /dev/null
then
docker compose pull
fi
2 changes: 0 additions & 2 deletions .framework/java/backend/Dockerfile

This file was deleted.

6 changes: 3 additions & 3 deletions .framework/java/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
anythink-backend-java:
build: ./backend
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we do it, remove the Docker file from each directory

image: public.ecr.aws/v0a2l7y2/wilco/anythink-backend-java:latest
container_name: anythink-backend-java
command: sh -c "cd backend && /wait-for-it.sh postgres-java:5432 -q -t 60 && ./start.sh"

Expand All @@ -17,9 +17,9 @@ services:
- "postgres-java"

anythink-frontend-react:
build: ./frontend
image: public.ecr.aws/v0a2l7y2/wilco/anythink-frontend-react:latest
container_name: anythink-frontend-react
command: sh -c "cd frontend && yarn install && /wait-for-it.sh anythink-backend-java:3000 -t 120 --strict -- curl --head -X GET --retry 30 --retry-connrefused --retry-delay 1 anythink-backend-java:3000/api/ping && yarn start"
command: sh -c "cd frontend && /wait-for-it.sh anythink-backend-java:3000 -t 120 --strict -- curl --head -X GET --retry 30 --retry-connrefused --retry-delay 1 anythink-backend-java:3000/api/ping && yarn start"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yarn install is when users add packages

environment:
- NODE_ENV=development
- PORT=3001
Expand Down
1 change: 0 additions & 1 deletion .framework/node/backend/Dockerfile

This file was deleted.

8 changes: 4 additions & 4 deletions .framework/node/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
services:
anythink-backend-node:
build: ./backend
image: public.ecr.aws/v0a2l7y2/wilco/anythink-backend-node:latest
container_name: anythink-backend-node
command: sh -c "cd backend && yarn install && /wait-for-it.sh mongodb-node:27017 -q -t 60 && yarn dev"
command: sh -c "cd backend && /wait-for-it.sh mongodb-node:27017 -q -t 60 && yarn dev"

environment:
- NODE_ENV=development
Expand All @@ -19,9 +19,9 @@ services:
- "mongodb-node"

anythink-frontend-react:
build: ./frontend
image: public.ecr.aws/v0a2l7y2/wilco/anythink-frontend-react:latest
container_name: anythink-frontend-react
command: sh -c "cd frontend && yarn install && /wait-for-it.sh anythink-backend-node:3000 -t 120 --strict -- curl --head -X GET --retry 30 --retry-connrefused --retry-delay 1 anythink-backend-node:3000/api/ping && yarn start"
command: sh -c "cd frontend && /wait-for-it.sh anythink-backend-node:3000 -t 120 --strict -- curl --head -X GET --retry 30 --retry-connrefused --retry-delay 1 anythink-backend-node:3000/api/ping && yarn start"
environment:
- NODE_ENV=development
- PORT=3001
Expand Down
2 changes: 0 additions & 2 deletions .framework/python/backend/Dockerfile

This file was deleted.

6 changes: 3 additions & 3 deletions .framework/python/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
anythink-backend-python:
build: ./backend
image: public.ecr.aws/v0a2l7y2/wilco/anythink-backend-python:latest
container_name: anythink-backend-python
command: >
sh -c "cd backend &&
Expand All @@ -24,9 +24,9 @@ services:
- "postgres-python"

anythink-frontend-react:
build: ./frontend
image: public.ecr.aws/v0a2l7y2/wilco/anythink-frontend-react:latest
container_name: anythink-frontend-react
command: sh -c "cd frontend && yarn install && /wait-for-it.sh anythink-backend-python:3000 -t 120 --strict -- curl --head -X GET --retry 30 --retry-connrefused --retry-delay 1 anythink-backend-python:3000/api/ping && yarn start"
command: sh -c "cd frontend && /wait-for-it.sh anythink-backend-python:3000 -t 120 --strict -- curl --head -X GET --retry 30 --retry-connrefused --retry-delay 1 anythink-backend-python:3000/api/ping && yarn start"
environment:
- NODE_ENV=development
- PORT=3001
Expand Down
1 change: 0 additions & 1 deletion .framework/rails/backend/Dockerfile

This file was deleted.

6 changes: 3 additions & 3 deletions .framework/rails/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
anythink-backend-rails:
build: ./backend
image: public.ecr.aws/v0a2l7y2/wilco/anythink-backend-rails:latest
container_name: anythink-backend-rails
command: sh -c "cd backend && bundle install && /wait-for-it.sh postgres-rails:5432 -q -t 60 && ./start_rails.sh"

Expand All @@ -18,9 +18,9 @@ services:
- "postgres-rails"

anythink-frontend-react:
build: ./frontend
image: public.ecr.aws/v0a2l7y2/wilco/anythink-frontend-react:latest
container_name: anythink-frontend-react
command: sh -c "cd frontend && yarn install && /wait-for-it.sh anythink-backend-rails:3000 -t 120 --strict -- curl --head -X GET --retry 30 --retry-connrefused --retry-delay 1 anythink-backend-rails:3000/api/ping && yarn start"
command: sh -c "cd frontend && /wait-for-it.sh anythink-backend-rails:3000 -t 120 --strict -- curl --head -X GET --retry 30 --retry-connrefused --retry-delay 1 anythink-backend-rails:3000/api/ping && yarn start"
environment:
- NODE_ENV=development
- PORT=3001
Expand Down
1 change: 0 additions & 1 deletion .framework/react/frontend/Dockerfile

This file was deleted.

Loading