forked from wiktor/spejstore-new
Pin container versions, simplify initial setup
This commit is contained in:
parent
af9ed46861
commit
5e598d80b4
|
@ -0,0 +1,11 @@
|
||||||
|
*.py[co]
|
||||||
|
db.sqlite3
|
||||||
|
*.swp
|
||||||
|
spejstore.env
|
||||||
|
env/
|
||||||
|
backups
|
||||||
|
media/
|
||||||
|
django-tree/
|
||||||
|
postgres-hstore/
|
||||||
|
.ropeproject/
|
||||||
|
docker-compose.yml
|
|
@ -8,3 +8,4 @@ media/
|
||||||
django-tree/
|
django-tree/
|
||||||
postgres-hstore/
|
postgres-hstore/
|
||||||
.ropeproject/
|
.ropeproject/
|
||||||
|
docker-compose.override.yml
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM python:3.5
|
FROM python:3.5.9@sha256:3a71fd2dac2343263993f4ab898c9398dfbfd0235dafe41e784876b69bdfa899
|
||||||
ENV PYTHONUNBUFFERED 1
|
ENV PYTHONUNBUFFERED 1
|
||||||
RUN mkdir /code
|
RUN mkdir /code
|
||||||
WORKDIR /code
|
WORKDIR /code
|
||||||
|
|
|
@ -7,13 +7,12 @@ Please use Python3, for the love of `$deity`...
|
||||||
|
|
||||||
### Quick start
|
### Quick start
|
||||||
|
|
||||||
1. Open `docker-compose.yml` and make changes as comments indicate (TODO: Please someone make this not awful)
|
1. Run:
|
||||||
2. Run:
|
|
||||||
```sh
|
```sh
|
||||||
|
ln -s docker-compose.dev-override.yml docker-compose.override.yml
|
||||||
docker-compose up --build
|
docker-compose up --build
|
||||||
```
|
```
|
||||||
3. Open `spejstore/urls.py` and comment out `url(r'^admin/login/.*', auth_redirect),`
|
2. Run `docker-compose run --rm web python manage.py createsuperuser` -- now you can dev authenticate w/o SSO
|
||||||
4. Run `docker-compose run --rm web python manage.py createsuperuser` -- now you can dev authenticate w/o SSO
|
|
||||||
|
|
||||||
### Build & run
|
### Build & run
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
version: "3"
|
||||||
|
services:
|
||||||
|
web:
|
||||||
|
environment:
|
||||||
|
- SPEJSTORE_ENV=dev
|
||||||
|
- SPEJSTORE_ALLOWED_HOSTS=localhost,127.0.0.1
|
|
@ -0,0 +1,6 @@
|
||||||
|
version: "3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
volumes:
|
||||||
|
- /var/spejstore-data:/var/lib/postgresql/data
|
|
@ -1,14 +1,10 @@
|
||||||
version: "2.3"
|
version: "3"
|
||||||
services:
|
services:
|
||||||
db:
|
db:
|
||||||
build: postgres-hstore
|
build: postgres-hstore
|
||||||
restart: always
|
restart: always
|
||||||
# NOTE: Comment out `volumes` for development
|
environment:
|
||||||
volumes:
|
- POSTGRES_HOST_AUTH_METHOD=trust
|
||||||
- /var/spejstore-data:/var/lib/postgresql/data
|
|
||||||
# NOTE: Uncomment this awful thing for development
|
|
||||||
# environment:
|
|
||||||
# - POSTGRES_HOST_AUTH_METHOD=trust
|
|
||||||
|
|
||||||
web:
|
web:
|
||||||
build: .
|
build: .
|
||||||
|
@ -20,8 +16,7 @@ services:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
|
environment:
|
||||||
env_file:
|
- SPEJSTORE_CLIENT_ID
|
||||||
- spejstore-dev.env
|
- SPEJSTORE_SECRET
|
||||||
# NOTE: Comment out this for development
|
- SPEJSTORE_ENV
|
||||||
- spejstore.env
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
FROM postgres:latest
|
FROM postgres:9.6.17@sha256:5b39dd4a26a02fee26902c84d8bafb2eb0ab9a2874fb0be22056107aa6508899
|
||||||
MAINTAINER Piotr Dobrowolski
|
MAINTAINER Piotr Dobrowolski
|
||||||
ADD create_extension.sh /docker-entrypoint-initdb.d/create_extension.sh
|
ADD create_extension.sh /docker-entrypoint-initdb.d/create_extension.sh
|
||||||
|
|
|
@ -21,8 +21,9 @@ router.register(r'labels', apiviews.LabelViewSet)
|
||||||
|
|
||||||
# Wire up our API using automatic URL routing.
|
# Wire up our API using automatic URL routing.
|
||||||
# Additionally, we include login URLs for the browsable API.
|
# Additionally, we include login URLs for the browsable API.
|
||||||
urlpatterns = [
|
urlpatterns = ([
|
||||||
url(r'^admin/login/.*', auth_redirect),
|
url(r'^admin/login/.*', auth_redirect),
|
||||||
|
] if settings.PROD else []) + [
|
||||||
url(r'^admin/', admin.site.urls),
|
url(r'^admin/', admin.site.urls),
|
||||||
url(r'^select2/', include('django_select2.urls')),
|
url(r'^select2/', include('django_select2.urls')),
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue