mirror of
				https://github.com/ComputerScienceHouse/proxstar.git
				synced 2025-03-09 15:40:09 +00:00 
			
		
		
		
	Fix docker bad practice
This commit is contained in:
		
							parent
							
								
									48e4b6e820
								
							
						
					
					
						commit
						6ab066d5b6
					
				
					 3 changed files with 12 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -2,10 +2,14 @@
 | 
			
		|||
 | 
			
		||||
If you want to work on Proxstar using a 1:1 development setup, there are a couple things you're going to need
 | 
			
		||||
 | 
			
		||||
- A machine you can SSH into, portforward from, and run Flask, Redis, and Docker on
 | 
			
		||||
- A machine you can
 | 
			
		||||
    - SSH into
 | 
			
		||||
        - With portforwarding (see `man ssh` for info on the `-L` option)
 | 
			
		||||
    - and run
 | 
			
		||||
        - Flask
 | 
			
		||||
        - Redis
 | 
			
		||||
        - Docker
 | 
			
		||||
- At least one (1) Proxmox host running Proxmox >6.3
 | 
			
		||||
- Docker
 | 
			
		||||
- SSH portforwarding
 | 
			
		||||
- A CSH account
 | 
			
		||||
- An RTP (to tell you secrets)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -13,7 +17,7 @@ If you want to work on Proxstar using a 1:1 development setup, there are a coupl
 | 
			
		|||
 | 
			
		||||
I would recommend setting up a development account on your Proxmox node. Name it anything. (Maybe `proxstartest`?). This is necessary to grab authentication tokens and the like. It should have the same permissions as `root@pam`. You can accomplish this by creating a group in `Datacenter > Permissions > Groups` and adding `Administrator` permissions to the group, then adding your user to the group. If you do this, then it's easy to enable/disable it for development. You should also generate an SSH key for the user.
 | 
			
		||||
 | 
			
		||||
You will also have to set up a pool on your Proxmox node with your csh username. To do this, go into `Datacenter > Permissions > Pools > Create`.
 | 
			
		||||
You might also have to set up a pool on your Proxmox node with your CSH username. To do this, go into `Datacenter > Permissions > Pools > Create`.
 | 
			
		||||
 | 
			
		||||
2. Set up your environment
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -32,8 +36,7 @@ source venv/bin/activate
 | 
			
		|||
Install required Python modules
 | 
			
		||||
```
 | 
			
		||||
pip install -r requirements.txt
 | 
			
		||||
pip install click==7.1.2 
 | 
			
		||||
pip install python-dotenv
 | 
			
		||||
pip install click==7.1.2 python-dotenv
 | 
			
		||||
```
 | 
			
		||||
Fill out the required fields in your config_local.py file. You might have to come back to this after you run the docker compose.
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,12 +3,12 @@ services:
 | 
			
		|||
  proxstar-redis:
 | 
			
		||||
    image: "redis:alpine"
 | 
			
		||||
    ports:
 | 
			
		||||
      - 6379:6379
 | 
			
		||||
      - 127.0.0.1:6379:6379
 | 
			
		||||
  proxstar-postgres:
 | 
			
		||||
    build: ./proxstar-postgres
 | 
			
		||||
    # image: postgres
 | 
			
		||||
    # restart: always
 | 
			
		||||
    ports:
 | 
			
		||||
      - 5432:5432
 | 
			
		||||
      - 127.0.0.1:5432:5432
 | 
			
		||||
    environment:
 | 
			
		||||
      POSTGRES_PASSWORD: tits12348
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,4 +8,4 @@ RUN apt-get update \
 | 
			
		|||
 | 
			
		||||
#COPY ./schema/large.sql /docker-entrypoint-initdb.d/ # Woa there, pal; That's a lot of   S C H E M A.
 | 
			
		||||
# I volunteer as tribute. DM me if this breaks.
 | 
			
		||||
ADD https://csh.rit.edu/~wilnil/proxstar-postgres/large.sql /docker-entrypoint-initdb.d/
 | 
			
		||||
RUN curl https://csh.rit.edu/~wilnil/proxstar-postgres/large.sql -o /docker-entrypoint-initdb.d/large.sql
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue