GithubHelp home page GithubHelp logo

sidpalas / devops-directive-docker-course Goto Github PK

View Code? Open in Web Editor NEW
1.5K 1.5K 870.0 1.43 MB

Companion repo for complete Docker course

Makefile 32.46% Go 6.56% JavaScript 13.70% HTML 0.95% CSS 5.34% Roff 40.78% Dockerfile 0.20%

devops-directive-docker-course's People

Contributors

mesmith027 avatar sidpalas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

devops-directive-docker-course's Issues

Getting 'DATABASE_URL' is not recognized as an internal or external command on running make run-api-node command

PS D:\dockerCourse\devops-directive-docker-course\05-example-web-application\api-node> cd ..
PS D:\dockerCourse\devops-directive-docker-course\05-example-web-application> make run-api-node
Starting node api
cd api-node &&
DATABASE_URL=postgres://postgres:foobarbaz@localhost:5432/postgres
npm run dev
'DATABASE_URL' is not recognized as an internal or external command,
operable program or batch file.
make: *** [run-api-node] Error 1

nvm use 19.4 issue

On node version 19.4.0, It gives me this error.
Screenshot 2023-12-13 at 10 20 21 AM

I then switched the node version to 20.0.0, and it was able to run successfully.

Connect to remote database question

As I see you are not using ports directive in docker-swarm.yml:

db:
image: postgres:15.1-alpine
volumes:
- pgdata:/var/lib/postgresql/data
environment:
- PGUSER=postgres
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres-passwd
secrets:
- postgres-passwd
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
networks:
- backend

@sidpalas can you please share a knolage on how to connect the database to manage data from your comuter?

I tried to use the following instructions but without success:

What I have tried locally:

cd 12-deploying-containers/docker-swarm
docker context create example --docker "host=ssh://root@example-app-server-ip:22"
docker context use example
docker stack deploy -c docker-swarm.yml example-app # deployed your example to VPS
docker ps # to get container id: 148cac4c4793
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' 148cac4c4793 # to get container ip: 10.0.11.3
ssh -L 5432:10.0.11.3:5432 root@example-app-server-ip # connected to docker swarm server
psql --version # psql (PostgreSQL) 15.3 (Homebrew)
psql -h 127.0.0.1 -p 5432 -U postgres postgres

psql: error: connection to server at "127.0.0.1", port 5432 failed: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.

P.S.: Thank you for the tutorial, it is really helpful!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.