parent
2108a159a3
commit
7c1eb4c6e3
@ -1,44 +1,11 @@ |
||||
FROM ubuntu:22.04 |
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive |
||||
ADD .. /service |
||||
|
||||
RUN apt update |
||||
RUN apt -y upgrade |
||||
RUN apt install -y supervisor |
||||
RUN apt install -y python3-pip |
||||
RUN apt install -y ffmpeg |
||||
RUN apt install -y imagemagick |
||||
RUN apt install -y postgresql |
||||
RUN apt install -y libpq-dev |
||||
|
||||
COPY supervisord.conf /etc/supervisord.conf |
||||
|
||||
COPY requirements.txt /etc/requirements.txt |
||||
|
||||
RUN pip3 install -r /etc/requirements.txt |
||||
|
||||
RUN mkdir /images |
||||
RUN mkdir /songs |
||||
RUN mkdir /videos |
||||
RUN mkdir /audio |
||||
RUN mkdir /asset_submissions |
||||
RUN mkdir /asset_submissions/marseys |
||||
RUN mkdir /asset_submissions/hats |
||||
RUN mkdir /asset_submissions/marseys/original |
||||
RUN mkdir /asset_submissions/hats/original |
||||
|
||||
ENV NODE_VERSION=16.13.0 |
||||
RUN apt install -y curl |
||||
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash |
||||
ENV NVM_DIR=/root/.nvm |
||||
RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION} |
||||
RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION} |
||||
RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION} |
||||
ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}" |
||||
RUN node --version |
||||
RUN npm --version |
||||
RUN npm i -g yarn |
||||
RUN /service/ubuntu_setup.sh |
||||
|
||||
EXPOSE 80/tcp |
||||
|
||||
CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisord.conf" ] |
||||
RUN apt install -y supervisor |
||||
|
||||
CMD [ "/usr/bin/supervisord", "-c", "/service/supervisord.conf" ] |
||||
|
@ -1,38 +1,46 @@ |
||||
version: '2.3' |
||||
|
||||
services: |
||||
files: |
||||
container_name: "rDrama" |
||||
build: |
||||
context: . |
||||
volumes: |
||||
- "./:/service" |
||||
env_file: env |
||||
environment: |
||||
- DATABASE_URL=postgresql://postgres@postgres:5432 |
||||
- REDIS_URL=redis://redis |
||||
links: |
||||
- "redis" |
||||
- "postgres" |
||||
ports: |
||||
- "80:80" |
||||
depends_on: |
||||
- redis |
||||
- postgres |
||||
files: |
||||
container_name: "rDrama" |
||||
build: |
||||
context: . |
||||
volumes: |
||||
- "./:/service" |
||||
env_file: env |
||||
environment: |
||||
- DATABASE_URL=postgresql://postgres@postgres:5432 |
||||
- REDIS_URL=redis://redis |
||||
links: |
||||
- "redis" |
||||
- "postgres" |
||||
ports: |
||||
- "5000:5000" |
||||
depends_on: |
||||
- redis |
||||
- postgres |
||||
- nginx |
||||
|
||||
redis: |
||||
image: redis |
||||
ports: |
||||
- "6379:6379" |
||||
redis: |
||||
image: redis |
||||
ports: |
||||
- "6379:6379" |
||||
|
||||
postgres: |
||||
image: postgres:12.3 |
||||
command: ["postgres", "-c", "log_statement=all"] |
||||
# uncomment this if u wanna output all SQL queries to the console |
||||
volumes: |
||||
- "./schema.sql:/docker-entrypoint-initdb.d/00-schema.sql" |
||||
- "./seed-db.sql:/docker-entrypoint-initdb.d/10-seed-db.sql" |
||||
environment: |
||||
- POSTGRES_HOST_AUTH_METHOD=trust |
||||
ports: |
||||
- "5432:5432" |
||||
postgres: |
||||
image: postgres |
||||
command: ["postgres", "-c", "log_statement=all"] |
||||
volumes: |
||||
- "./schema.sql:/docker-entrypoint-initdb.d/00-schema.sql" |
||||
- "./seed-db.sql:/docker-entrypoint-initdb.d/10-seed-db.sql" |
||||
environment: |
||||
- POSTGRES_HOST_AUTH_METHOD=trust |
||||
ports: |
||||
- "5432:5432" |
||||
|
||||
nginx: |
||||
image: nginx |
||||
ports: |
||||
- "80:80" |
||||
volumes: |
||||
- ./nginx.txt:/etc/nginx/conf.d/default.conf |
||||
- ./nginx-serve-static.txt:/etc/nginx/includes/serve-static |
||||
|
Loading…
Reference in new issue