Scripts to run specific services
Last active
March 16, 2024 21:42
-
-
Save GabrielCzar/c6c1250b6d3f61c70a9b73198c091f4f to your computer and use it in GitHub Desktop.
Docker compose samples
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
version: '3.1' | |
services: | |
db: | |
image: mongo:latest | |
volumes: | |
- db_data:/data/db | |
ports: | |
- 27017:27017 | |
restart: always | |
environment: | |
MONGO_INITDB_ROOT_USERNAME: root | |
MONGO_INITDB_ROOT_PASSWORD: pass | |
mongo-express: | |
image: mongo-express | |
restart: always | |
ports: | |
- 8081:8081 | |
environment: | |
ME_CONFIG_MONGODB_ADMINUSERNAME: root | |
ME_CONFIG_MONGODB_ADMINPASSWORD: pass |
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
version: '3.1' | |
services: | |
db: | |
image: mysql:5.7 | |
command: --default-authentication-plugin=mysql_native_password | |
volumes: | |
- /var/lib/mysql:/var/lib/mysql | |
restart: always | |
environment: | |
- MYSQL_ROOT_PASSWORD=mysql | |
- MYSQL_DATABASE=sample | |
- MYSQL_USER=mysql | |
- MYSQL_PASSWORD=mysql | |
adminer: | |
image: adminer | |
restart: always | |
ports: | |
- 8088:8080 | |
environment: | |
- ADMINER_DESIGN=pepa-linha |
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
version: "3" | |
services: | |
web: | |
build: . | |
volumes: | |
- ./:/src | |
- /src/node_modules | |
ports: | |
- "3000:3000" | |
links: | |
- mongo | |
mongo: | |
image: mongo | |
ports: | |
- "27017:27017" |
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
version: '3.1' | |
services: | |
postgis: | |
image: kartoza/postgis | |
restart: always | |
ports: 25432:5432 | |
volumes: | |
pg_data:/var/lib/postgresql | |
environment: | |
POSTGRES_USER="dbuser" | |
POSTGRES_PASS="dbpass" | |
POSTGRES_DBNAME="dbtest" |
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
#!/usr/bin/env bash | |
URL_GISTS='https://gist.githubusercontent.com/GabrielCzar/c6c1250b6d3f61c70a9b73198c091f4f/raw/034d40fe106500b5317ca26bbba8efb5e1119d52/' | |
echo "Required Docker-compose installed" | |
echo "Insert GIST NAME" | |
read GIST_NAME | |
wget "$URL_GISTS/$GIST_NAME" | |
mv $GIST_NAME "docker-compose.yml" | |
echo | |
echo "docker-compose.yml created." | |
echo | |
echo "Starting container" | |
docker-compose up |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment