Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge project setup with appropriate local dev environment settings #1

Merged
merged 77 commits into from
Nov 18, 2023
Merged
Changes from 1 commit
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
f10d29c
Configured pytest for dev environment
katporks Nov 2, 2023
dc3fe33
updated wagtail
katporks Nov 2, 2023
235752b
Separated dockerfile, dockercompose builds into different environments
katporks Nov 2, 2023
d824b93
Automated docker-compose migration for local development
katporks Nov 2, 2023
bf8315e
Added make command for refreshing the db
katporks Nov 2, 2023
b73fa89
Added COPYING and LICENSE
katporks Nov 2, 2023
8a3f66b
Wrote README.md
katporks Nov 2, 2023
322d42d
Configuring workflow - hot_osm.yml
katporks Nov 2, 2023
f2693a0
Removed example workflow
katporks Nov 2, 2023
9be6ae2
Changed pytest to pytest-django for db reliant tests
katporks Nov 3, 2023
00db28d
Trying hot_osm github workflow for image builds
katporks Nov 3, 2023
edbcb12
Fix: Added action file to correct directory
katporks Nov 3, 2023
5ae2a8e
Configuring hotosm Image Build workflow
katporks Nov 3, 2023
050de02
Fix: GH actions troubleshoot - removed static files from .dockerignore
katporks Nov 3, 2023
6300058
Automated superuser creation for local environments based .env.dev
katporks Nov 3, 2023
5a33eaf
Updated README to reflect .env.dev superuser creation
katporks Nov 3, 2023
7149d28
Added hotosm's pytest GH workflow
katporks Nov 3, 2023
cd75256
Fix: Removed colon from img tag and replaced it with hyphen
katporks Nov 3, 2023
c489492
Fix: Drew out conditionals in attempt to fix formatting error
katporks Nov 3, 2023
dbf2048
Fix: found the source of tag in image_build.yml
katporks Nov 3, 2023
592ee86
Fix: added build_context and build_dockerfile
katporks Nov 3, 2023
60097f7
Fix: Debugging pytest action through Dockerfile
katporks Nov 4, 2023
5668bd1
Fix: added ci declaration to fix pytest workflow
katporks Nov 4, 2023
80bfa62
Synthesized example .envs into .env.example
katporks Nov 10, 2023
bcc1caa
Added image tag to docker-compose.dev.yml
katporks Nov 10, 2023
11d2c42
Separated workflows for image build and pytest
katporks Nov 10, 2023
0907b84
Switched workflow to test via docker compose
katporks Nov 10, 2023
f9c6610
Formatted branches + added dev env to workflow
katporks Nov 10, 2023
c2dcb86
Streamlined pytest.yml
katporks Nov 10, 2023
b62c193
Removed redundant Dockerfile for previous workflow
katporks Nov 10, 2023
dd37061
Removed pipenv in favour of poetry
katporks Nov 11, 2023
44368df
Removed conditional environments for .env
katporks Nov 11, 2023
83c7d35
Removed references to alternate .env
katporks Nov 11, 2023
e17fad0
Fix: Changed docker service name
katporks Nov 11, 2023
86185e4
Fix: Added wait-for-it and pytest-timeout due to infinite test loop
katporks Nov 11, 2023
36090d8
Fix: Changed script order in Dockerfile
katporks Nov 11, 2023
bbaf88e
Fix: Loading environment from .env in docker-compose
katporks Nov 11, 2023
8d0c0ea
Fix: Corrected example DB_HOST to match docker service
katporks Nov 11, 2023
f8cbf41
Fix: Added time out to wait-for-it.sh
katporks Nov 11, 2023
f0327a7
Fix: Corrected example db port
katporks Nov 11, 2023
cee5e31
Fix: Updated default example values
katporks Nov 11, 2023
769ffa7
Linked postgres variables to .env file
katporks Nov 11, 2023
c0f2c1f
Removed wait-for-it script
katporks Nov 11, 2023
ca50dbb
Added shell command for gh workflow
katporks Nov 14, 2023
379bb4a
Fix: Updated .env.example for substitution
katporks Nov 14, 2023
3fe991c
Updated .gitignore
katporks Nov 15, 2023
7b7956c
Added wait for it command in docker compose
katporks Nov 15, 2023
7a2bce7
Added sleep for 10 seconds before running the server
katporks Nov 15, 2023
4862f85
Added health check to address db timeout
katporks Nov 15, 2023
74639fa
Removed pytest timeout for testing purposes
katporks Nov 15, 2023
a29fb2e
Added missing default values to .env.example
katporks Nov 16, 2023
ec1ba1d
Switched from docker-compose to docker compose
katporks Nov 16, 2023
c00cb08
Added secrets: inherit to workflows
katporks Nov 17, 2023
6607bdf
Separated builds into base and server
katporks Nov 17, 2023
084d80e
Added test build to Dockerfile and test service in docker-compose.dev…
katporks Nov 17, 2023
bbd2205
Added build_target
katporks Nov 17, 2023
53fa061
Added blank compose_command
katporks Nov 17, 2023
5f4e14d
Added gunicorn package
katporks Nov 17, 2023
96dc863
Removed pip install gunicorn
katporks Nov 17, 2023
24f3514
Added permissions to wagtail user for pytest to run
katporks Nov 17, 2023
c630de3
Testing location of pytest as compose_command
katporks Nov 17, 2023
3379af2
Testing pytest compose_command with path st in Dockerfile.dev
katporks Nov 17, 2023
379e2d7
Revert "Testing pytest compose_command with path st in Dockerfile.dev"
katporks Nov 17, 2023
392956c
Revert "Testing location of pytest as compose_command"
katporks Nov 17, 2023
a37ae16
Revert "Added permissions to wagtail user for pytest to run"
katporks Nov 17, 2023
a3be2d0
Removed pip install gunicorn
katporks Nov 17, 2023
f9ddd47
Testing with a failing test
katporks Nov 17, 2023
f97f16a
Revert "Testing with a failing test"
katporks Nov 17, 2023
833067e
Updated poetry dependencies
katporks Nov 17, 2023
5b7ffc2
build: combine dockerfiles into single multistage
spwoodcock Nov 17, 2023
f1e87cd
docs: update refs to Dockerfile.dev
spwoodcock Nov 17, 2023
58f9bf9
build: update compose config to use targets + pinned postgres
spwoodcock Nov 17, 2023
1c202fe
ci: update workflows to use single dockerfile
spwoodcock Nov 17, 2023
f8bde7e
ci(pytest): use web service instead, removed test svc
spwoodcock Nov 17, 2023
615df59
build: fix typo in requirements.txt file
spwoodcock Nov 17, 2023
e1d0916
refactor: add to dockerignore
spwoodcock Nov 17, 2023
e411466
build: fix appuser --> wagtail for dep copy
spwoodcock Nov 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added make command for refreshing the db
katporks committed Nov 2, 2023
commit bf8315ecaea1a3110c537d5c338c3dd089ae3a7f
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@

build-dev:
@docker-compose -f docker-compose.dev.yml build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

recent versions of docker-compose use docker compose without the - so this is breaking in my local tests.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docker compose V2 is much better (docker compose). It's Golang / much faster & has plugins inbuilt like buildkit.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dakotabenjamin @spwoodcock gotcha! I'll switch to docker compose. thanks!

@docker-compose -f docker-compose.dev.yml up -d

build-prod:
@docker-compose -f docker-compose.prod.yml build
@@ -10,7 +11,7 @@ test:
@pytest

up-dev:
@docker-compose -f docker-compose.dev.yml up
@docker-compose -f docker-compose.dev.yml up -d

up-prod:
@docker-compose -f docker-compose.prod.yml up
@@ -20,3 +21,6 @@ down-dev:

down-prod:
@docker-compose -f docker-compose.prod.yml down

refresh-db:
@docker volume rm $(docker volume ls -q)