Compare commits
No commits in common. "f60a6f1204fceff8645d40a0fefed8ca228cba9d" and "fe480828f411a7eced19335adf26f712253c090e" have entirely different histories.
f60a6f1204
...
fe480828f4
3 changed files with 0 additions and 60 deletions
5
.env
5
.env
|
|
@ -1,5 +0,0 @@
|
|||
WRSR_DATABASE_NAME="wsrs"
|
||||
WRSR_DATABASE_USER="postgres"
|
||||
WRSR_DATABASE_PASSWORD="123456789"
|
||||
WRSR_DATABASE_PORT=5432
|
||||
WRSR_DATABASE_HOST="localhost"
|
||||
24
README.md
24
README.md
|
|
@ -1,24 +0,0 @@
|
|||
# Introduction
|
||||
|
||||
This project aims to create a AMA style page using `react` on frontend and `go` on backend.
|
||||
|
||||
## Initialize project
|
||||
|
||||
```bash
|
||||
$ go mod init forgejo.home.viniciussouza.me/learning/go-react-server
|
||||
```
|
||||
|
||||
## Database migrations
|
||||
|
||||
### Installing tern
|
||||
|
||||
```bash
|
||||
$ go install github.com/jackc/tern/v2@latest
|
||||
```
|
||||
|
||||
### Creating migrations
|
||||
|
||||
```bash
|
||||
$ tern new --migrations ./internal/store/pgstore/migrations create_rooms_table
|
||||
$ tern new --migrations ./internal/store/pgstore/migrations create_messages_table
|
||||
```
|
||||
31
compose.yml
31
compose.yml
|
|
@ -1,31 +0,0 @@
|
|||
services:
|
||||
db:
|
||||
image: postgres:latest
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- ${WRSR_DATABASE_PORT:-5432}:5432
|
||||
environment:
|
||||
POSTGRES_USER: ${WRSR_DATABASE_USER}
|
||||
POSTGRES_PASSWORD: ${WRSR_DATABASE_PASSWORD}
|
||||
POSTGRES_DB: ${WRSR_DATABASE_NAME}
|
||||
volumes:
|
||||
- db:/var/lib/postgresql/data
|
||||
|
||||
pgadmin:
|
||||
image: dpage/pgadmin4:latest
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- db
|
||||
ports:
|
||||
- 8081:80
|
||||
environment:
|
||||
PGADMIN_DEFAULT_EMAIL: admin@admin.com
|
||||
PGADMIN_DEFAULT_PASSWORD: password
|
||||
volumes:
|
||||
- pgadmin:/var/lib/pgadmin
|
||||
|
||||
volumes:
|
||||
db:
|
||||
driver: local
|
||||
pgadmin:
|
||||
driver: local
|
||||
Loading…
Reference in a new issue