mirror of
https://github.com/taigaio/taiga-docker.git
synced 2025-07-29 00:44:18 +02:00
Initial taiga-gateway
This commit is contained in:
parent
72ff171f65
commit
09d9887e01
@ -11,23 +11,23 @@ Additionally, it's necessary to have familiarity with Docker, docker-compose and
|
|||||||
- share a configuration file (see example in `taiga-back/settings`) and set the proper `DJANGO_SETTINGS_MODULE` envvar
|
- share a configuration file (see example in `taiga-back/settings`) and set the proper `DJANGO_SETTINGS_MODULE` envvar
|
||||||
- modify `docker-compose.yml` as needed
|
- modify `docker-compose.yml` as needed
|
||||||
|
|
||||||
|
## Up
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
Default port for the application is 9000.
|
||||||
|
|
||||||
## One shot commands
|
## One shot commands
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ docker-compose -f docker-compose.yml -f docker-compose-inits.yml run --rm taiga-manage [COMMAND]
|
$ docker-compose -f docker-compose.yml -f docker-compose-inits.yml run --rm taiga-manage [COMMAND]
|
||||||
```
|
```
|
||||||
|
|
||||||
## Up
|
## Sample data
|
||||||
|
|
||||||
```sh
|
This command, optional, some sample data to test the environment. It's important to run it **after running once the application** (which applies migrations). Otherwise, this command will fail.
|
||||||
$ docker-compose up -d
|
|
||||||
$ docker-compose -f docker-compose.yml -f docker-compose-inits.yml run --rm taiga-migrate
|
|
||||||
$ docker-compose -f docker-compose.yml -f docker-compose-inits.yml run --rm taiga-collectstatic
|
|
||||||
```
|
|
||||||
|
|
||||||
This command, optional, creates an initial user (admin / 123123) and some sample data to test the environment.
|
|
||||||
```sh
|
```sh
|
||||||
$ docker-compose -f docker-compose.yml -f docker-compose-inits.yml run --rm taiga-sampledata
|
$ docker-compose -f docker-compose.yml -f docker-compose-inits.yml run --rm taiga-sampledata
|
||||||
```
|
```
|
||||||
|
|
||||||
Back/API exposes port 8000
|
|
||||||
|
@ -1,25 +1,6 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
taiga-migrate:
|
|
||||||
image: taigaio/taiga-back:alpha
|
|
||||||
environment:
|
|
||||||
DJANGO_SETTINGS_MODULE: "settings.config"
|
|
||||||
volumes:
|
|
||||||
- ./taiga-back/settings/config.py:/taiga-back/settings/config.py
|
|
||||||
depends_on:
|
|
||||||
- taiga-db
|
|
||||||
entrypoint: "python manage.py migrate"
|
|
||||||
|
|
||||||
taiga-collectstatic:
|
|
||||||
image: taigaio/taiga-back:alpha
|
|
||||||
environment:
|
|
||||||
DJANGO_SETTINGS_MODULE: "settings.config"
|
|
||||||
volumes:
|
|
||||||
- ./taiga-back/settings/config.py:/taiga-back/settings/config.py
|
|
||||||
- ./static-data:/taiga-back/static
|
|
||||||
entrypoint: "python manage.py collectstatic --no-input"
|
|
||||||
|
|
||||||
taiga-sampledata:
|
taiga-sampledata:
|
||||||
image: taigaio/taiga-back:alpha
|
image: taigaio/taiga-back:alpha
|
||||||
environment:
|
environment:
|
||||||
@ -28,7 +9,7 @@ services:
|
|||||||
- ./taiga-back/settings/config.py:/taiga-back/settings/config.py
|
- ./taiga-back/settings/config.py:/taiga-back/settings/config.py
|
||||||
depends_on:
|
depends_on:
|
||||||
- taiga-db
|
- taiga-db
|
||||||
entrypoint: bash -c "python manage.py loaddata initial_user && python manage.py loaddata initial_project_templates && python manage.py sample_data"
|
entrypoint: bash -c "python manage.py sample_data"
|
||||||
|
|
||||||
taiga-manage:
|
taiga-manage:
|
||||||
image: taigaio/taiga-back:alpha
|
image: taigaio/taiga-back:alpha
|
||||||
@ -36,7 +17,6 @@ services:
|
|||||||
DJANGO_SETTINGS_MODULE: "settings.config"
|
DJANGO_SETTINGS_MODULE: "settings.config"
|
||||||
volumes:
|
volumes:
|
||||||
- ./taiga-back/settings/config.py:/taiga-back/settings/config.py
|
- ./taiga-back/settings/config.py:/taiga-back/settings/config.py
|
||||||
- ./static-data:/taiga-back/static
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- taiga-db
|
- taiga-db
|
||||||
entrypoint: "python manage.py"
|
entrypoint: "python manage.py"
|
||||||
|
@ -7,8 +7,6 @@ services:
|
|||||||
POSTGRES_DB: taiga
|
POSTGRES_DB: taiga
|
||||||
POSTGRES_USER: taiga
|
POSTGRES_USER: taiga
|
||||||
POSTGRES_PASSWORD: taiga
|
POSTGRES_PASSWORD: taiga
|
||||||
ports:
|
|
||||||
- "5432:5432"
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./db-data:/var/lib/postgresql/data
|
- ./db-data:/var/lib/postgresql/data
|
||||||
|
|
||||||
@ -16,17 +14,29 @@ services:
|
|||||||
image: taigaio/taiga-back:alpha
|
image: taigaio/taiga-back:alpha
|
||||||
environment:
|
environment:
|
||||||
DJANGO_SETTINGS_MODULE: "settings.config"
|
DJANGO_SETTINGS_MODULE: "settings.config"
|
||||||
ports:
|
|
||||||
- "8000:8000"
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./taiga-back/settings/config.py:/taiga-back/settings/config.py
|
- ./taiga-back/settings/config.py:/taiga-back/settings/config.py
|
||||||
- ./static-data:/taiga-back/static
|
- static-data:/taiga-back/static
|
||||||
|
- media-data:/taiga-back/media
|
||||||
depends_on:
|
depends_on:
|
||||||
- taiga-db
|
- taiga-db
|
||||||
|
|
||||||
taiga-front:
|
taiga-front:
|
||||||
image: taigaio/taiga-front:alpha
|
image: taigaio/taiga-front:alpha
|
||||||
|
volumes:
|
||||||
|
- ./taiga-front/conf/conf.json:/usr/share/nginx/html/conf.json
|
||||||
|
|
||||||
|
taiga-gateway:
|
||||||
|
image: nginx:1.19-alpine
|
||||||
ports:
|
ports:
|
||||||
- "9000:80"
|
- "9000:80"
|
||||||
volumes:
|
volumes:
|
||||||
- ./taiga-front/conf/conf.json:/usr/share/nginx/html/conf.json
|
- ./taiga-gateway/taiga.conf:/etc/nginx/conf.d/default.conf
|
||||||
|
- static-data:/taiga/static
|
||||||
|
- media-data:/taiga/media
|
||||||
|
depends_on:
|
||||||
|
- taiga-back
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
static-data:
|
||||||
|
media-data:
|
||||||
|
@ -38,6 +38,11 @@ DATABASES = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MEDIA_URL = "http://localhost:9000/media/"
|
||||||
|
STATIC_URL = "http://localhost:9000/static/"
|
||||||
|
SITES["api"] = {
|
||||||
|
"domain": "localhost:9000", "scheme": "http", "name": "api"
|
||||||
|
}
|
||||||
|
|
||||||
#########################################
|
#########################################
|
||||||
## CONTRIBS
|
## CONTRIBS
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"api": "http://localhost:8000/api/v1/",
|
"api": "http://localhost:9000/api/v1/",
|
||||||
"eventsUrl": null,
|
"eventsUrl": null,
|
||||||
"eventsMaxMissedHeartbeats": 5,
|
"eventsMaxMissedHeartbeats": 5,
|
||||||
"eventsHeartbeatIntervalTime": 60000,
|
"eventsHeartbeatIntervalTime": 60000,
|
||||||
|
50
docker/taiga-gateway/taiga.conf
Normal file
50
docker/taiga-gateway/taiga.conf
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
server {
|
||||||
|
listen 80 default_server;
|
||||||
|
|
||||||
|
client_max_body_size 100M;
|
||||||
|
charset utf-8;
|
||||||
|
|
||||||
|
access_log /var/log/nginx/taiga6.access.log;
|
||||||
|
error_log /var/log/nginx/taiga6.error.log;
|
||||||
|
|
||||||
|
# Frontend
|
||||||
|
location / {
|
||||||
|
proxy_pass http://taiga-front/;
|
||||||
|
proxy_pass_header Server;
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_redirect off;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Scheme $scheme;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Api
|
||||||
|
location /api {
|
||||||
|
proxy_pass http://taiga-back:8000/api;
|
||||||
|
proxy_pass_header Server;
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_redirect off;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Scheme $scheme;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Admin
|
||||||
|
location /admin {
|
||||||
|
proxy_pass http://taiga-back:8000/admin;
|
||||||
|
proxy_pass_header Server;
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_redirect off;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Scheme $scheme;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Static
|
||||||
|
location /static {
|
||||||
|
root /taiga;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Media
|
||||||
|
location /media {
|
||||||
|
root /taiga;
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user