refactor(docker-compose): combine dockerfiles with entrypoint (#727)
* combine worker and main image, support encryption key, app secret key env, and postgres pw * Update docker/entrypoint.sh fix env file path Co-authored-by: Ali BARIN <ali.barin53@gmail.com> * add build tag, move compose to root * add volumes * style: remove trailing indent * refactor(docker-compose): empty encryption env. vars * docs(docker-compose): update compose folder * refactor(docker-compose): remove host network * fix(docker-compose): add environment variable keys Co-authored-by: Ali BARIN <ali.barin53@gmail.com>
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM node:16
|
||||
WORKDIR /automatisch
|
||||
|
||||
RUN apt-get update && apt-get install -y postgresql-client
|
||||
COPY ./wait-for-postgres.sh /automatisch/wait-for-postgres.sh
|
||||
|
||||
RUN mkdir -p /automatisch/storage
|
||||
RUN touch /automatisch/storage/.env
|
||||
RUN echo "ENCRYPTION_KEY=$(openssl rand -base64 36)" >> /automatisch/storage/.env
|
||||
RUN echo "APP_SECRET_KEY=$(openssl rand -base64 36)" >> /automatisch/storage/.env
|
||||
RUN yarn global add @automatisch/cli@0.2.0
|
||||
|
||||
EXPOSE 3000
|
||||
CMD sh /automatisch/wait-for-postgres.sh automatisch start --env-file=/automatisch/storage/.env
|
@@ -1,10 +0,0 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM node:16
|
||||
WORKDIR /automatisch
|
||||
|
||||
RUN apt-get update && apt-get install -y postgresql-client
|
||||
|
||||
COPY ./wait-for-postgres.sh /automatisch/wait-for-postgres.sh
|
||||
|
||||
RUN yarn global add @automatisch/cli@0.2.0
|
||||
CMD sh /automatisch/wait-for-postgres.sh automatisch start-worker --env-file /automatisch/storage/.env
|
Reference in New Issue
Block a user