fix nginxconf
This commit is contained in:
parent
2ebfb8e6a9
commit
15fc9aa483
@ -2298,7 +2298,7 @@ async function startTaigaService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
|
|
||||||
exec "$@"`;
|
exec "$@"`;
|
||||||
|
|
||||||
const Dockerfile = `
|
const DockerfileBack = `
|
||||||
FROM taigaio/taiga-back:latest
|
FROM taigaio/taiga-back:latest
|
||||||
COPY ./entrypoint_superuser.sh /taiga-back/docker/entrypoint_superuser.sh
|
COPY ./entrypoint_superuser.sh /taiga-back/docker/entrypoint_superuser.sh
|
||||||
COPY ./entrypoint_coolify.sh /taiga-back/docker/entrypoint_coolify.sh
|
COPY ./entrypoint_coolify.sh /taiga-back/docker/entrypoint_coolify.sh
|
||||||
@ -2306,6 +2306,10 @@ async function startTaigaService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
RUN ["chmod", "+x", "/taiga-back/docker/entrypoint_coolify.sh"]
|
RUN ["chmod", "+x", "/taiga-back/docker/entrypoint_coolify.sh"]
|
||||||
RUN ["chmod", "+x", "/taiga-back/docker/entrypoint.sh"]`;
|
RUN ["chmod", "+x", "/taiga-back/docker/entrypoint.sh"]`;
|
||||||
|
|
||||||
|
const DockerfileGateway = `
|
||||||
|
FROM nginx:1.19-alpine
|
||||||
|
COPY ./nginx.conf /etc/nginx/conf.d/default.conf`;
|
||||||
|
|
||||||
const nginxConf = `server {
|
const nginxConf = `server {
|
||||||
listen 80 default_server;
|
listen 80 default_server;
|
||||||
|
|
||||||
@ -2383,10 +2387,14 @@ async function startTaigaService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
}`
|
}`
|
||||||
await fs.writeFile(`${workdir}/entrypoint_superuser.sh`, superUserEntrypoint);
|
await fs.writeFile(`${workdir}/entrypoint_superuser.sh`, superUserEntrypoint);
|
||||||
await fs.writeFile(`${workdir}/entrypoint_coolify.sh`, entrypoint);
|
await fs.writeFile(`${workdir}/entrypoint_coolify.sh`, entrypoint);
|
||||||
await fs.writeFile(`${workdir}/Dockerfile`, Dockerfile);
|
await fs.writeFile(`${workdir}/DockerfileBack`, DockerfileBack);
|
||||||
|
await fs.writeFile(`${workdir}/DockerfileGateway`, DockerfileGateway);
|
||||||
await fs.writeFile(`${workdir}/nginx.conf`, nginxConf);
|
await fs.writeFile(`${workdir}/nginx.conf`, nginxConf);
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
|
['taiga-gateway']: {
|
||||||
|
volumes: [`${id}-static-data:/taiga-back/static`, `${id}-media-data:/taiga-back/media`],
|
||||||
|
},
|
||||||
['taiga-front']: {
|
['taiga-front']: {
|
||||||
image: `${image}:${version}`,
|
image: `${image}:${version}`,
|
||||||
environmentVariables: {
|
environmentVariables: {
|
||||||
@ -2467,10 +2475,7 @@ async function startTaigaService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
TAIGA_SECRET_KEY: secretKey,
|
TAIGA_SECRET_KEY: secretKey,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
['taiga-gateway']: {
|
|
||||||
image: `nginx:1.19-alpine`,
|
|
||||||
volumes: [`${id}-static-data:/taiga-back/static`, `${id}-media-data:/taiga-back/media`],
|
|
||||||
},
|
|
||||||
postgresql: {
|
postgresql: {
|
||||||
image: `postgres:12.3`,
|
image: `postgres:12.3`,
|
||||||
volumes: [`${id}-postgresql-data:/var/lib/postgresql/data`],
|
volumes: [`${id}-postgresql-data:/var/lib/postgresql/data`],
|
||||||
@ -2493,9 +2498,11 @@ async function startTaigaService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
version: '3.8',
|
version: '3.8',
|
||||||
services: {
|
services: {
|
||||||
[id]: {
|
[id]: {
|
||||||
container_name: id,
|
build: {
|
||||||
image: config['taiga-gateway'].image,
|
context: '.',
|
||||||
volumes: [...config['taiga-gateway'].volumes, `./nginx.conf:/etc/nginx/conf.d/default.conf`],
|
dockerfile: 'DockerfileGateway',
|
||||||
|
},
|
||||||
|
volumes: config['taiga-gateway'].volumes,
|
||||||
labels: makeLabelForServices('taiga'),
|
labels: makeLabelForServices('taiga'),
|
||||||
...defaultComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
},
|
},
|
||||||
@ -2507,7 +2514,10 @@ async function startTaigaService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
...defaultComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
},
|
},
|
||||||
[`${id}-taiga-back`]: {
|
[`${id}-taiga-back`]: {
|
||||||
build: workdir,
|
build: {
|
||||||
|
context: '.',
|
||||||
|
dockerfile: 'DockerfileBack',
|
||||||
|
},
|
||||||
entrypoint: '/taiga-back/docker/entrypoint_coolify.sh',
|
entrypoint: '/taiga-back/docker/entrypoint_coolify.sh',
|
||||||
container_name: `${id}-taiga-back`,
|
container_name: `${id}-taiga-back`,
|
||||||
environment: config['taiga-back'].environmentVariables,
|
environment: config['taiga-back'].environmentVariables,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user