-
Notifications
You must be signed in to change notification settings - Fork 0
/
man
28 lines (23 loc) · 1.1 KB
/
man
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
REVERSE PROXY
dockerfile = dockerfile.proxy
sudo docker build -f dockerfile.proxy -t proxy-server
# container name proxy
sudo docker run -it --rm -p 8000:80 --network dgnet --name proxy proxy-server
APACHE FILE SERVER
dockerfile = dockerfile.apache
sudo docker build -f dockerfile.apache -t file-server
# container name apache
sudo docker run -it --rm -p 3000:80 --network dgnet --name apache file-server
API
# api runs on port 8080 in development so i don't have to change the dockerfile when moving it to production
dockerfile = dockerfile.api
sudo docker build -f dockerfile.api -t api-server
# container name api
sudo docker run -it --rm -p 8080:8080 --network dgnet --name api api-server
# usefulf or local dev connecting to postgresql, but when running on cloudrun, this isn't necessary
# mount the token to the container
-v "$HOME/.config/gcloud/application_default_credentials.json":/gcp/creds.json:ro --env GOOGLE_APPLICATION_CREDENTIALS=/gcp/creds.json
NETWORK
sudo docker network create dgnet
clean:
sudo docker system prune --all