mirror of
https://github.com/demostf/setup
synced 2026-06-04 00:54:07 +02:00
add api and upload
This commit is contained in:
parent
21a0aaa6bc
commit
cada773b11
2 changed files with 8 additions and 14 deletions
16
api.tmpl
16
api.tmpl
|
|
@ -5,21 +5,9 @@ server {
|
|||
|
||||
client_max_body_size 150m;
|
||||
|
||||
include upload.conf;
|
||||
|
||||
index index.php;
|
||||
|
||||
try_files $uri /index.php?$query_string /index.php;
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass api:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME /app/public/index.php;
|
||||
}
|
||||
|
||||
location = /upload {
|
||||
fastcgi_pass api:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME /app/public/upload.php;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ services:
|
|||
- "./api.tmpl:/etc/nginx/conf.d/api.tmpl"
|
||||
environment:
|
||||
- HOST=${HOST}
|
||||
- UPLOAD_FASTCGI=api:9000
|
||||
- UPLOAD_SCRIPT=/app/public/upload.php
|
||||
networks:
|
||||
- proxy-tier
|
||||
depends_on:
|
||||
|
|
@ -20,11 +22,15 @@ services:
|
|||
image: demostf/api
|
||||
container_name: api
|
||||
environment:
|
||||
- BASE_HOST=${HOST}
|
||||
- DEMO_ROOT=/demos
|
||||
- DB_TYPE=pgsql
|
||||
- DB_HOST=db
|
||||
- DB_DATABASE=postgres
|
||||
- DB_USERNAME=postgres
|
||||
- DB_PASSWORD=${DB_PASSWORD}
|
||||
volumes:
|
||||
- "${DEMO_ROOT}:/demos"
|
||||
networks:
|
||||
- proxy-tier
|
||||
- db-tier
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue