mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 10:05:41 +00:00
docker compose
This commit is contained in:
@@ -1,6 +1,31 @@
|
|||||||
# Development Setup
|
# 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
|
### 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
|
$ 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/)
|
Please refer to [official instructions](https://nodejs.org/en/download/)
|
||||||
|
|
||||||
3. Install yarn:
|
3. Install yarn:
|
||||||
|
|||||||
10
README.md
10
README.md
@@ -65,7 +65,15 @@ to their request.
|
|||||||
|
|
||||||
## Demo
|
## 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:
|
## 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:
|
||||||
Reference in New Issue
Block a user