This repository has been archived by the owner on Jan 20, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an example docker-compose config
* Make uwsgi use its own proto, and not http * Bundle psycopg2 with the image * Add an example nginx config
- Loading branch information
Showing
4 changed files
with
51 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
server { | ||
listen 80 default_server; | ||
location / { try_files $uri @amber; } | ||
location @amber { | ||
include uwsgi_params; | ||
uwsgi_pass amber:8080; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
version: "3" | ||
|
||
volumes: | ||
postgres: | ||
|
||
services: | ||
amber: | ||
build: . | ||
restart: always | ||
# You'll likely need to add other drivers, like mysql-connector-python, to | ||
# connect to databases other than the default SQLite and PostgreSQL. See: | ||
# https://docs.sqlalchemy.org/en/13/core/engines.html#database-urls | ||
environment: | ||
- AMBER_DATABASE=postgres://amber:CHANGEME@database:5432/amber | ||
- AMBER_LOGLEVEL=2 | ||
- AMBER_ALLOW_SIGNUP=0 | ||
- UWSGI_PORT=8080 | ||
- UWSGI_PROCESSES=1 | ||
- UWSGI_THREADS=2 | ||
depends_on: | ||
- database | ||
database: | ||
image: postgres:11-alpine | ||
restart: always | ||
environment: | ||
- POSTGRES_DB=amber | ||
- POSTGRES_USER=amber | ||
- POSTGRES_PASSWORD=CHANGEME | ||
volumes: | ||
- postgres:/var/lib/postgresql/data | ||
web: | ||
image: nginx:1.16-alpine | ||
ports: | ||
- 80:80 | ||
depends_on: | ||
- amber | ||
volumes: | ||
- ./doc/nginx.conf.example:/etc/nginx/conf.d/default.conf:ro |