Add web app Docker image build
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
parent
36d230eb92
commit
03208df33d
@ -0,0 +1,8 @@
|
||||
import os
|
||||
|
||||
with open('.env', 'w') as f:
|
||||
f.write("POSTGRES_USER={}\n".format(os.getenv('POSTGRES_USER')))
|
||||
f.write("POSTGRES_PASSWORD={}\n".format(os.getenv('POSTGRES_PASSWORD')))
|
||||
f.write("POSTGRES_DATABASE={}\n".format(os.getenv('POSTGRES_DATABASE')))
|
||||
f.write("CLIENT_ID={}\n".format(os.getenv('CLIENT_ID')))
|
||||
f.write("CLIENT_SECRET={}\n".format(os.getenv('CLIENT_SECRET')))
|
@ -0,0 +1,23 @@
|
||||
FROM node:latest
|
||||
|
||||
# Install Python and pip
|
||||
RUN apt-get update && \
|
||||
apt-get install -y python3 python3-pip && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set working directory inside the container
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY web/* ./
|
||||
COPY common/* ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install ./web/src
|
||||
RUN pip3 install os
|
||||
|
||||
# Expose the port the app runs on
|
||||
EXPOSE 3000
|
||||
|
||||
# Command to run the application
|
||||
CMD ["python3", "common/set-env-var.py"]
|
||||
CMD ["node", "--env-file=common/.env" , "web/src/app.js"]
|
Loading…
Reference in new issue