docker compose
This commit is contained in:
parent
d0c5ffb486
commit
bf9f2a6cbc
3 changed files with 59 additions and 3 deletions
|
@ -1,6 +1,31 @@
|
|||
# Development Setup
|
||||
|
||||
## Setting up development environment
|
||||
## To quickly make changes:
|
||||
|
||||
We have a docker-compose config that you can use to quickly spin up dev
|
||||
environment.
|
||||
|
||||
From the root of the repo, run:
|
||||
|
||||
```bash
|
||||
$ docker-compose -d up
|
||||
```
|
||||
|
||||
### Logs from docker:
|
||||
|
||||
- Logs from database and web server as they are generated:
|
||||
|
||||
```bash
|
||||
$ docker-compose logs -f
|
||||
```
|
||||
|
||||
- from just webserver:
|
||||
|
||||
```bash
|
||||
$ docker-compose logs -f guard
|
||||
```
|
||||
|
||||
## Setting up elaborate development environment
|
||||
|
||||
### Toolchain
|
||||
|
||||
|
@ -13,7 +38,7 @@ You'll have to install before you can start writing code.
|
|||
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
```
|
||||
|
||||
2. Install Node:
|
||||
2. Install Node `v14.16.0`:
|
||||
Please refer to [official instructions](https://nodejs.org/en/download/)
|
||||
|
||||
3. Install yarn:
|
||||
|
|
10
README.md
10
README.md
|
@ -65,7 +65,15 @@ to their request.
|
|||
|
||||
## Demo
|
||||
|
||||
Coming soon...
|
||||
Clone the repo and run the following from the root of the repo:
|
||||
|
||||
```bash
|
||||
$ docker-compose -d up
|
||||
```
|
||||
|
||||
It takes a while to build the image so please be patient :)
|
||||
|
||||
A hosted demo server is in the works...
|
||||
|
||||
## Development:
|
||||
|
||||
|
|
23
docker-compose.yml
Normal file
23
docker-compose.yml
Normal file
|
@ -0,0 +1,23 @@
|
|||
version: '3.9'
|
||||
|
||||
services:
|
||||
guard:
|
||||
build: .
|
||||
ports:
|
||||
- 7000:7000
|
||||
environment:
|
||||
DATABASE_URL: postgres://postgres:password@postgres:5432/postgres
|
||||
RUST_LOG: debug
|
||||
|
||||
postgres:
|
||||
image: postgres:13.2
|
||||
#ports: 5432:5432
|
||||
volumes:
|
||||
- mcaptcha-guard-data:/var/lib/postgresql/
|
||||
environment:
|
||||
POSTGRES_PASSWORD: password
|
||||
PGDATA: /var/lib/postgresql/data/guard/
|
||||
|
||||
|
||||
volumes:
|
||||
mcaptcha-guard-data:
|
Loading…
Reference in a new issue