Skip to content

Commit

Permalink
Local environment improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
khromov committed Sep 25, 2020
1 parent 1f14a4c commit 6a062b5
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,15 @@ and edit as necessary.
To set up and update the database:

docker-compose run --rm cron composer install
docker-compose run --rm cron deploy/migrate-db.sh
docker-compose run --rm cron

To start a web server on `localhost:30100`:

docker-compose up -d web
docker-compose up web

#### Services

* Web: http://localhost:30100/
* Adminer: http://localhost:30101/ (See credentials in `.env.postgres.local`)

2 changes: 2 additions & 0 deletions deploy/migrate-db.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "Running DB migrations..."
bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration --env=$APP_ENV
6 changes: 5 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
# Stick with 9.6 for now to ensure compatibility with shared infrastructure's instance.
image: postgres:9.6-alpine
volumes:
- local_data:/var/lib/postgresql/data
- ./local_data:/var/lib/postgresql/
ports:
- 5432:5432
env_file:
Expand Down Expand Up @@ -41,3 +41,7 @@ services:
- .env.local
depends_on:
- db
adminer:
image: adminer
ports:
- 30101:8080
Empty file added local_data/.gitkeep
Empty file.

0 comments on commit 6a062b5

Please sign in to comment.