-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pushchanges #35
Open
alboyaci
wants to merge
2
commits into
docker:main
Choose a base branch
from
alboyaci:pushchanges
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Pushchanges #35
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,34 @@ | ||
# Include any files or directories that you don't want to be copied to your | ||
# container here (e.g., local build artifacts, temporary files, etc.). | ||
# | ||
# For more help, visit the .dockerignore file reference guide at | ||
# https://docs.docker.com/go/build-context-dockerignore/ | ||
|
||
**/.DS_Store | ||
**/__pycache__ | ||
**/.venv | ||
**/.classpath | ||
**/.dockerignore | ||
**/.env | ||
**/.git | ||
**/.gitignore | ||
**/.project | ||
**/.settings | ||
**/.toolstarget | ||
**/.vs | ||
**/.vscode | ||
**/*.*proj.user | ||
**/*.dbmdl | ||
**/*.jfm | ||
**/bin | ||
**/charts | ||
**/docker-compose* | ||
**/compose.y*ml | ||
**/Dockerfile* | ||
**/node_modules | ||
**/npm-debug.log | ||
**/obj | ||
**/secrets.dev.yaml | ||
**/values.dev.yaml | ||
LICENSE | ||
README.md |
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,51 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
# Comments are provided throughout this file to help you get started. | ||
# If you need more help, visit the Dockerfile reference guide at | ||
# https://docs.docker.com/go/dockerfile-reference/ | ||
|
||
# Want to help us make this template better? Share your feedback here: https://forms.gle/ybq9Krt8jtBL3iCk7 | ||
|
||
ARG PYTHON_VERSION=3.9.13 | ||
FROM python:${PYTHON_VERSION}-slim as base | ||
|
||
# Prevents Python from writing pyc files. | ||
ENV PYTHONDONTWRITEBYTECODE=1 | ||
|
||
# Keeps Python from buffering stdout and stderr to avoid situations where | ||
# the application crashes without emitting any logs due to buffering. | ||
ENV PYTHONUNBUFFERED=1 | ||
|
||
WORKDIR /app | ||
|
||
# Create a non-privileged user that the app will run under. | ||
# See https://docs.docker.com/go/dockerfile-user-best-practices/ | ||
ARG UID=10001 | ||
RUN adduser \ | ||
--disabled-password \ | ||
--gecos "" \ | ||
--home "/nonexistent" \ | ||
--shell "/sbin/nologin" \ | ||
--no-create-home \ | ||
--uid "${UID}" \ | ||
appuser | ||
|
||
# Download dependencies as a separate step to take advantage of Docker's caching. | ||
# Leverage a cache mount to /root/.cache/pip to speed up subsequent builds. | ||
# Leverage a bind mount to requirements.txt to avoid having to copy them into | ||
# into this layer. | ||
RUN --mount=type=cache,target=/root/.cache/pip \ | ||
--mount=type=bind,source=requirements.txt,target=requirements.txt \ | ||
python -m pip install -r requirements.txt | ||
|
||
# Switch to the non-privileged user to run the application. | ||
USER appuser | ||
|
||
# Copy the source code into the container. | ||
COPY . . | ||
|
||
# Expose the port that the application listens on. | ||
EXPOSE 30000 | ||
|
||
# Run the application. | ||
CMD localhost:30000 |
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,22 @@ | ||
### Building and running your application | ||
|
||
When you're ready, start your application by running: | ||
`docker compose up --build`. | ||
|
||
Your application will be available at http://localhost:30000. | ||
|
||
### Deploying your application to the cloud | ||
|
||
First, build your image, e.g.: `docker build -t myapp .`. | ||
If your cloud uses a different CPU architecture than your development | ||
machine (e.g., you are on a Mac M1 and your cloud provider is amd64), | ||
you'll want to build the image for that platform, e.g.: | ||
`docker build --platform=linux/amd64 -t myapp .`. | ||
|
||
Then, push it to your registry, e.g. `docker push myregistry.com/myapp`. | ||
|
||
Consult Docker's [getting started](https://docs.docker.com/go/get-started-sharing/) | ||
docs for more detail on building and pushing. | ||
|
||
### References | ||
* [Docker's Python guide](https://docs.docker.com/language/python/) |
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,38 +1,49 @@ | ||
# Comments are provided throughout this file to help you get started. | ||
# If you need more help, visit the Docker compose reference guide at | ||
# https://docs.docker.com/compose/compose-file/ | ||
|
||
# Here the instructions define your application as two services called "todo-app" and “todo-database” | ||
# The service “todo-app” is built from the Dockerfile in the /app directory, | ||
# and the service “todo-database” uses the official MongoDB image | ||
# from Docker Hub - https://hub.docker.com/_/mongo. | ||
# You can add other services your application may depend on here. | ||
# If you need more help, visit the Docker Compose reference guide at | ||
# https://docs.docker.com/go/compose-spec-reference/ | ||
|
||
# Here the instructions define your application as a service called "server". | ||
# This service is built from the Dockerfile in the current directory. | ||
# You can add other services your application may depend on here, such as a | ||
# database or a cache. For examples, see the Awesome Compose repository: | ||
# https://github.com/docker/awesome-compose | ||
services: | ||
todo-app: | ||
server: | ||
build: | ||
context: ./app | ||
depends_on: | ||
- todo-database | ||
environment: | ||
NODE_ENV: production | ||
context: . | ||
ports: | ||
- 3000:3000 | ||
- 35729:35729 | ||
develop: | ||
watch: | ||
- path: ./app/package.json | ||
action: rebuild | ||
- path: ./app | ||
target: /usr/src/app | ||
action: sync | ||
- 30000:30000 | ||
|
||
todo-database: | ||
image: mongo:6 | ||
#volumes: | ||
# - database:/data/db | ||
ports: | ||
- 27017:27017 | ||
# The commented out section below is an example of how to define a PostgreSQL | ||
# database that your application can use. `depends_on` tells Docker Compose to | ||
# start the database before your application. The `db-data` volume persists the | ||
# database data between container restarts. The `db-password` secret is used | ||
# to set the database password. You must create `db/password.txt` and add | ||
# a password of your choosing to it before running `docker compose up`. | ||
# depends_on: | ||
# db: | ||
# condition: service_healthy | ||
# db: | ||
# image: postgres | ||
# restart: always | ||
# user: postgres | ||
# secrets: | ||
# - db-password | ||
# volumes: | ||
# - db-data:/var/lib/postgresql/data | ||
# environment: | ||
# - POSTGRES_DB=example | ||
# - POSTGRES_PASSWORD_FILE=/run/secrets/db-password | ||
# expose: | ||
# - 5432 | ||
# healthcheck: | ||
# test: [ "CMD", "pg_isready" ] | ||
# interval: 10s | ||
# timeout: 5s | ||
# retries: 5 | ||
# volumes: | ||
# db-data: | ||
# secrets: | ||
# db-password: | ||
# file: db/password.txt | ||
|
||
#volumes: | ||
#database: |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CMakeLists.txt