-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from baimamboukar/baimamboukar-containerization
chore(docker): Dockerize `backend` and update docs to include `how to` run app's docker image
- Loading branch information
Showing
3 changed files
with
43 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
api-docs | ||
.github | ||
database | ||
programming_language_extensions.json | ||
AUTHORS | ||
CODE_OF_CONDUCT.md | ||
prototype |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
# Use a slim Perl image to reduce layer size | ||
FROM perl:latest | ||
WORKDIR /srv/TheWeeklyChallenge | ||
|
||
# Create a working directory for the application | ||
WORKDIR /app | ||
|
||
# Copy the application code from the context | ||
COPY . . | ||
RUN cpanm --installdeps --notest --with-feature=accelerate . | ||
|
||
# Install dependencies using cpanm | ||
RUN cpanm --installdeps --notest --with-feature=accelerate | ||
RUN cpanm Dancer2 Plack --force | ||
|
||
# Expose the port where the application will listen | ||
EXPOSE 4000 | ||
CMD plackup -p 4000 bin/app.psgi | ||
|
||
# Start the application using plackup | ||
CMD ["plackup", "-p", "4000", "bin/app.psgi"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters