You've already forked Php-Template
TODO: Tell someone to implement this
This commit is contained in:
17
README.md
17
README.md
@@ -8,3 +8,20 @@ export PHP_IDE_CONFIG=serverName=localhost
|
|||||||
```shell
|
```shell
|
||||||
docker run --rm -v $(PWD):/app siteworxpro/composer run tests:all
|
docker run --rm -v $(PWD):/app siteworxpro/composer run tests:all
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### migrations
|
||||||
|
|
||||||
|
create a new migration
|
||||||
|
```shell
|
||||||
|
docker run --rm -v $(PWD):/app siteworxpro/migrate:v4.18.3 create -ext sql -dir /app/db/migrations -seq create_users_table
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
```text
|
||||||
|
postgres://siteworxpro:password@localhost:5432/siteworxpro?sslmode=disable
|
||||||
|
```
|
||||||
|
```
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker run --rm -v $(PWD):/app siteworxpro/migrate:v4.18.3 -database "postgres://siteworxpro:password@localhost:5432/siteworxpro?sslmode=disable" -path /app/db/migrations up
|
||||||
|
```
|
||||||
31
docker-compose.yml
Normal file
31
docker-compose.yml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
volumes:
|
||||||
|
pgdata: {}
|
||||||
|
|
||||||
|
services:
|
||||||
|
dev-runtime:
|
||||||
|
ports:
|
||||||
|
- "9501:9501"
|
||||||
|
volumes:
|
||||||
|
- .:/app
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
entrypoint: "/bin/sh -c 'while true; do sleep 30; done;'"
|
||||||
|
|
||||||
|
migrations:
|
||||||
|
image: siteworxpro/migrate:v4.18.3
|
||||||
|
restart: no
|
||||||
|
volumes:
|
||||||
|
- .:/app
|
||||||
|
command: "-database 'postgres://${DB_DATABASE-siteworxpro}:${DB_PASSWORD-password}@${DB_HOST-postgres}:5432/siteworxpro?sslmode=disable' -path /app/db/migrations up"
|
||||||
|
|
||||||
|
postgres:
|
||||||
|
image: postgres:latest
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: ${DB_USERNAME:-siteworxpro}
|
||||||
|
POSTGRES_PASSWORD: ${DB_PASSWORD:-password}
|
||||||
|
POSTGRES_DB: ${DB_DATABASE:-siteworxpro}
|
||||||
|
ports:
|
||||||
|
- "5432:5432"
|
||||||
|
volumes:
|
||||||
|
- pgdata:/var/lib/postgresql/data
|
||||||
Reference in New Issue
Block a user