Skip to content

Commit a6b618c

Browse files
readme
1 parent 504c0ff commit a6b618c

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

samples/rails/README.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,33 @@
44

55
This template is a member list project developed using Ruby on Rails, offering a starting point to help you quickly build your team management system. We have prepared all the essential files for deployment. By spending less than 10 minutes setting up the environment, as detailed in the prerequisites, and executing the commands in our step-by-step guide, your website will be ready to go live to the world!
66

7-
## NOTE
8-
9-
This sample showcases how you could deploy a full-stack application with Defang in Ruby on Rails. However, it uses a SQLite database, which isn't production-ready and will be reset with every deployment. For production use cases you should use a managed database like RDS, Aiven, or others. If you stick to Rail's default SQLite database, your stored data will be lost on every deployment, and in some other cases. In the future, Defang will help you provision and connect to managed databases.
10-
117
## Essential Setup Files
128

139
1. A [Dockerfile](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/) to describe the basic image of your applications.
1410
2. A [docker-compose file](https://docs.defang.io/docs/concepts/compose) to define and run multi-container Docker applications.
1511
3. A [.dockerignore](https://docs.docker.com/build/building/context/#dockerignore-files) file to comply with the size limit (10MB).
1612

17-
## Prerequisite
13+
## Development Using [Dev Containers](https://containers.dev/)
14+
15+
1. Open the working directory with Visual Studio Code or any editor which supports Dev Containers.
16+
2. Click on the bottom left corner of the window where you see "Reopen in Container".
17+
3. Open up a shell in the VS Code terminal and run `docker compose -f compose.dev.yaml up`.
1818

19-
1. Download [Defang CLI](https://github.com/DefangLabs/defang)
20-
2. If you are using [Defang BYOC](https://docs.defang.io/docs/concepts/defang-byoc), make sure you have properly [authenticated your AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)
21-
3. Plus, make sure that you have properly set your environment variables like `AWS_PROFILE`, `AWS_REGION`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`.
2219

2320
## Deployment
2421

25-
1. Open the terminal and type `defang login`
26-
2. Type `defang compose up` in the CLI
27-
3. Now your application will be launched
22+
> [!NOTE]
23+
> Download [Defang CLI](https://github.com/DefangLabs/defang)
24+
25+
### Defang Playground
26+
27+
Deploy your application to the defang playground by opening up your terminal and typing `defang up`.
28+
29+
### BYOC (AWS)
30+
31+
If you want to deploy to your own cloud account, you can use Defang BYOC:
32+
33+
1. [Authenticate your AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html), and that you have properly set your environment variables like `AWS_PROFILE`, `AWS_REGION`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`.
2834

2935
---
3036

0 commit comments

Comments
 (0)